• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed  Unnecessary Code in XenForo_Helper_File



Class: XenForo_Helper_File
Method: public static function getTempDir()

There's a unnecessary code in the method
		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;)


XenForo developer
Staff member
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.