Jump to content

Recommended Posts

Posted

This code below is from applications/nexus/sources/Package/Group.php (lines 348-379):

//<?php
	/**
	 * [ActiveRecord] Duplicate
	 *
	 * @return	void
	 */
	public function __clone()
	{
		if ( $this->skipCloneDuplication === TRUE )
		{
			return;
		}

		$oldImage = $this->image;

		parent::__clone();

		if ( $oldImage )
		{
			try
			{
				$icon = \IPS\File::get( 'nexus_PackageGroups', $oldImage );
				$newIcon = \IPS\File::create( 'nexus_PackageGroups', $icon->originalFilename, $icon->contents() );
				$this->image = (string) $newIcon;
			}
			catch ( \Exception $e )
			{
				$this->pg_image = NULL;
			}

			$this->save();
		}
	}

 

The name inside the catch is wrongly using the db table prefix pg_ and should be removed:

$this->image = NULL;

 

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...