Non object Error?

    Date: 12/14/07 (PHP Community)    Keywords: tracker

    I have this in one of my object classes.

    static $errorTracker = NULL;
    public function __construct(){
    $this->errorTracker = ErrorTracker::getInstance();
    }

    protected function _isError($error){
    return $this->errorTracker->_isError($error);
    }



    And in the ErrorTracker class,

    public static function getInstance (){
    static $instance;
    if (!isset($instance)){
    $c = __CLASS__;
    $instance = new $c;
    }
    return $instance;
    }


    When this is run, I get:

    Fatal error: Call to a member function _isError() on a non-object

    Any idea why the ErrorTracker is falling out of scope? Thanks.

    Source: http://community.livejournal.com/php/603569.html

« Php backend setup? || apache + mod_ssl +... »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home