Re: DB_DataObject::createTables fatal error

From: Date: Thu, 06 Jan 2005 07:58:10 +0000
Subject: Re: DB_DataObject::createTables fatal error
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-16723@lists.php.net to get a copy of this message
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 -- Justin Patrin

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