View Full Version : PHP 5 new version issue
11-14-2012, 09:06 AM
My code was fine with before versions of php ,but after upgrading it 5.4 am getting following warning:
Creating default object from empty value
Though i tried to fix it using : ini_set('error_reporting', E_ALL);
But of no effect...Any help is appreciated...Thank you..
11-14-2012, 09:31 PM
That error level wouldn't remove it; E_WARNING is a part of the E_ALL level. I believe that as of 5.3 or 5.4 that E_STRICT was added into E_ALL as well.
I've never seen that error before. The only thing I can think of that would make it (since you didn't provide any code here) is a cast of a non-valid value:
$var = '';
$varObj = (object)$var;
All I know for sure is that would at least previously created $varObj->scalar, but its possible it was changed in 5.4. I can't test that until I get home though.
You'll need to track down that error and post what it was that triggered it. The line and file should be included in the error stack.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.