Object Error

Discussion in 'PHP' started by cesarcesar, May 11, 2006.

  1. #1
    I have just recently updated my server to PHP 5.1. I am getting a grip of errors in my logs now related to an object i use. This is just one of the error.

    Undefined property:  object::$core in /var/www/vhosts/site.com/httpdocs/index.php
    Code (markup):
    It is referencing a script i use like -

    
    // set object //
    class object {};
    $SITE = new object;
    
    // difine //
    $SITE->core = 'test string';
    
    // in use //
    echo"$SITE->core";
    
    Code (markup):
    Has this type of object usage degraded in 5.1, or is there something i need to set in my now updated php.ini file.

    Thanks.
     
    cesarcesar, May 11, 2006 IP
  2. MrSupplier

    MrSupplier Peon

    Messages:
    141
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Looks odd, your code works here in strict mode (php 5.1.4)
     
    MrSupplier, May 11, 2006 IP