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

Errors using PHP5.5 #114

Open Lufttaxi opened 11 years ago

Lufttaxi commented 11 years ago

Hello.

At the moment we are using a free web service. The provider updated PHP from version 5.4.x to 5.5 two nights ago ... and there our problems have begun. Nobody of us can book a flight or accept them. And the layout of the site is (in cause of the following error messages) not available.

Warning: Creating default object from empty value in /users/lufttaxi/www/phpvms/core/classes/Vars.class.php on line 74

Fatal error: Cannot re-assign auto-global variable _FILES in /users/lufttaxi/www/phpvms/core/common/PilotData.class.php on line 436

We are using the latest phpVMS version (Version 2.1.934).

You can see it on http://vms.lufttaxi.square7.de/ (sry for the advertisements or others ... if they come)

Oxymoron290 commented 11 years ago

Referencing Issue #102

I develop in a php5.4 environment also, and normally before submitting pull requests ill undo this fix to keep it uniform with the current installation. Check out commit a18d2d8 this is normally how I suppress the 5.4 strict standards, but I'm not sure if it's desirable.

Note: This commit undoes the suppression, which I accidentally added in commit b8f8681

This issue also applies to the following Issues #101, #77 (fixed in #84), and #91

You could try downloading the development branch and use that although I don't suggest that as it is considered "unstable" However, you can look at the commits, and pull requests associated with these issues to help resolve your issues.

Oxymoron290 commented 11 years ago

Basically, these issues are what I have been catering to lately along with Kyle (Vansers), and If you review my commits on this project you will be able to see how to resolve them.

Code Buffet: change core/common/PilotData.class.php on line 436

from: public static function saveAvatar($code, $pilotid, $_FILES) {

to: public static function saveAvatar($code, $pilotid) {

Then look at the bit on core/classes/Vars.class.php that looks like this:

    public static function setParameters()
    {
        self::$post = new stdClass();
        self::$get =  new stdClass();
        foreach($_POST as $key=>$value)
        {
            self::$post->$key = self::cleaned($value);
        }
        foreach($_GET as $key=>$value)
        {
            self::$get->$key = self::cleaned($value);
        }
        foreach($_REQUEST as $key=>$value)
        {
            self::$request->$key = self::cleaned($value);
        }
    }

after the 4th line there self::$get = new stdClass(); on the next line add self::$request = new stdClass();

Oxymoron290 commented 11 years ago

Waiting on a reply

Oxymoron290 commented 10 years ago

Is this issue resolved for you at this time?

sergioag commented 9 years ago

This should be closed. See #128