Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: PHP 5 new version issue
11-14-2012, 09:06 AM #1
- Join Date
- Nov 2012
- Thanked 0 Times in 0 Posts
PHP 5 new version issue
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 #2
- Join Date
- Sep 2002
- Saskatoon, Saskatchewan
- Thanked 2,662 Times in 2,631 Posts
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:
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.PHP Code:
$var = '';
$varObj = (object)$var;
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.