PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Database » DB_DataObject » Bug #3025

createTables gives an error

Details

Submitted2004-12-24 01:49 UTC
Fromdeveloper at ckiweb dot com
StatusBogus
PackageDB_DataObject
PHP Version4.3.10
OSGentoo
Roadmaps(Not assigned)

Comments

[2004-12-24 01:49 UTC] developer at ckiweb dot com

Description:
------------
I try running createTables.php and I get an error everytime when it tries to run generatedefinitions. It had run perfectly fine before, but I just upgraded to PHP-4-3-10, and now it is crashing.

Reproduce code:
---------------
just run createTables.php

Expected result:
----------------
I expect my tables to be made.

Actual result:
--------------
db_dataobject_generator : 0 : CREATING FOR ckidata

db_dataobject_generator : 0 : calling generatedefinitions

Fatal error: Call to a member function on a non-object in /usr/lib/php/DB/DataObject/Generator.php on line 132

[2004-12-24 01:52 UTC] developer at ckiweb dot com

var_dump seems to show some really funny things. If I do var_dump($t) before $t->_createTableList, I get the class. Right after $t->_createTableList, I get NULL, and in the foreach loop I get an array(62).

[2005-01-10 21:16 UTC] naveen at dittakavi dot com

Hi. I am having the same issue with 4.3.10... However I cannot load the newest snapshot -- I do not have control over my server as it is a shared hosting server. Is there ANY workaround or do we need to manually define our table structures in the ini file until 4.3.11 is released?

Note that I am only having trouble with createtables not queries (thank god).

[2005-01-11 21:04 UTC] naveen at dittakavi dot com

Thanks SOO Much. I always put define('DB_DATAOBJECT_NO_OVERLOAD',1); in DataObject.php but did not know I had to override it in createTables as well. Thanks again!

[2005-02-14 14:03 UTC] fprado at pmovil dot com dot br

Hello,

The only way I found it to work on my case was instancing the database as a reference, like below:

$t =& new $class;

Hope this helps!

Flavio