Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Nov 2012
    Posts
    1
    Thanks
    0
    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..

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 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:
    PHP Code:
    $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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •