phpvms / phpvms_v2

Virtual Airline Management (not maintained)
http://www.phpvms.net
BSD 3-Clause "New" or "Revised" License
41 stars 46 forks source link

Fatal error: Cannot re-assign auto-global variable _FILES in core\common\PilotData.class.php on line 431 #77

Closed Oxymoron290 closed 11 years ago

Oxymoron290 commented 12 years ago
/**
 * Save avatars
 * 
 * @param mixed $code
 * @param mixed $pilotid
 * @param mixed $_FILES
 * @return
 */
public static function saveAvatar($code, $pilotid, $_FILES) {
Oxymoron290 commented 12 years ago

After further review of the issue. Wouldn't it be acceptable to just remove the third parameter since your already using the super global in the method? Unless you're trying to make it portable. in which case... I'd give it a shot =)

nabeelio commented 12 years ago

Which PHP version are you on?

Oxymoron290 commented 12 years ago

PHP Version 5.4.4 dump of phpinfo() Build Date Jun 13 2012 21:17:57

Compiler MSVC9 (Visual C++ 2008)

Architecture x86

Configure Command" cscript /nologo configure.js "--enable-snapshot-build" "--disable-isapi" "--enable-debug-pack" "--without-mssql" "--without-pdo-mssql" "--without-pi3web" "--with-pdo-oci=C:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8=C:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8-11g=C:\php-sdk\oracle\instantclient11\sdk,shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet" "--with-mcrypt=static" "--disable-static-analyze" "--with-pgo"

nabeelio commented 12 years ago

I wonder if that's an E_STRICT error - if you try adding & ~ E_STRICT to your error_reporting, it might go away? That $_FILES doesn't belong there, in either case

Oxymoron290 commented 12 years ago

no, the misuse of pseudo $this-> in this phpVMS version is an E_STRICT notice in 5.4, attempting to reassign the auto global throws a Fatal error, as in script cannot continue. Anyways, plenty of users are still running 5.3 so it isn't priority. But at least we already know the fixes =)

nabeelio commented 12 years ago

Yeah, this has to be patched for 5.4, but unfortunately don't have the time right now