Fixed  Unnecessary Code in XenForo_Helper_File

  • Thread starter Thread starter ragtek
  • Start date Start date
R

ragtek

Guest
Class: XenForo_Helper_File
Method: public static function getTempDir()

There's a unnecessary code in the method
PHP:
		return self::getInternalDataPath() . '/temp';

		$tempDir = @ini_get('upload_tmp_dir');
		if ($tempDir)
		{
			return $tempDir;
		}

		return sys_get_temp_dir();
	}
You have a return at the beginn of the method, which means that the code after it, never will run, so you can delete it;)

It's minimalistic but it would be nicer to have a clean & nice code;)
 
I wasn't sure if the new code was going to stick, but it doesn't seem to have any issues, so no need for the old code.
 
Top Bottom