Re: DB_DataObject::createTables fatal error

From: Date: Thu, 06 Jan 2005 06:32:47 +0000
Subject: Re: DB_DataObject::createTables fatal error
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-16720@lists.php.net to get a copy of this message
see http://pear.php.net/bugs/bug.php?id=3025 I have same problem and I install php 4.3.9 to another path for execute "createTables.php" ;) It works good Didier Galland 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); 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 (#16720) next »