Re: DB_DataObject::createTables fatal error

From: Date: Thu, 06 Jan 2005 12:53:12 +0000
Subject: Re: DB_DataObject::createTables fatal error
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-16731@lists.php.net to get a copy of this message
it's easier to test with the snaps.php.net than waste to much time with 4.3.10 interestingly I just check with my snaps version of 5.0.4dev (from 3rd Jan) and the isset($string->fakevalue) bug is still there. Regards Alan Justin Patrin wrote:
On Thu, 06 Jan 2005 03:48:50 +0100, Didier Galland <listsdg@yahoo.fr> wrote:
On a windows machine + php 4.3.10 + DB_DataObject 1.7.2 (also tested with 1.7.1) + define('DB_DATAOBJECT_NO_OVERLOAD',true);
Are you defining this in createTables.php *before* the DB/DataObject.php include?
createTables.php always give : "Fatal error : call to a member function on a non object in c:\path\...\Generator.php on line 132" $t is indeed a valid generator object before calling _createTableList() and NULL after... I don't know why. I Suspect some php 4.3.10 weird behaviour. Making instance by reference ($t =& new $class; instead of $t = new $class;) on line 121 solves the problem.
     $class = get_class($this);
           $t =& new $class;
           $t->_database_dsn = $database;
           $t->_database = $databasename;
           $t->_createTableList();
Hope this can help. Regards, Didier


« previous php.pear.general (#16731) next »