PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Database » DB_DataObject » Bug #1354

Undefined property: stdClass::$name and ::$type in Generator.php (with SQLite)

Details

Submitted2004-05-06 17:22 UTC
Fromthomas dot haas at fht-esslingen dot de
Assignedalan_k
StatusClosed
PackageDB_DataObject
PHP Version5.0.0RC2 (Release Candidate 2)
OSwin xp
Roadmaps(Not assigned)

Comments

[2004-05-06 17:22 UTC] thomas dot haas at fht-esslingen dot de

Description:
------------
I get

Notice: Undefined property: stdClass::$type in C:\php\PEAR\DB\DataObject\Generator.php on line 253

(line 253 = switch (strtoupper($t->type)) in function _generateDefinitionsTable())

If i start createTables.php in my_generator (look at reproduce code) on a SQLite DB.

createTables create all classes, but without fields (only table names in __table was created).

Even I get

Notice: Undefined property: stdClass::$name in C:\php\PEAR\DB\DataObject\Generator.php on line 345

(line 345 = if (!strlen(trim($t->name))) in function _generateDefinitionsTable())

and

Notice: Undefined property: stdClass::$name in C:\php\PEAR\DB\DataObject\Generator.php on line 473

(line 473 = if (!strlen(trim($t->name))) in function _generateClassTable($input = ''))

I work with DataObject 1.5.3.
phpSQLiteAdmin does work fine with the same DB.

Reproduce code:
---------------
dbDataObject.ini:
*************************************
database = sqlite:///mydb.db
schema_location = C:\myPath\DataObject
class_location = C:\myPath\DataObject
require_prefix = C:\myPath\DataObject
DataObject_User
class_prefix = DataObject_
debug = 0
debug_ignore_updates = false
dont_die = TRUE
*************************************

my_generator.php
*************************************
<?php
$_SERVER['argv'][1] = 'dbDataObject.ini';
require_once 'DB/DataObject/createTables.php';
?>
*************************************

Expected result:
----------------
CreateTables should pass through without the notice and with creating fields.

Actual result:
--------------
I get

Notice: Undefined property: stdClass::$type in C:\php\PEAR\DB\DataObject\Generator.php on line 253

(line 253 = switch (strtoupper($t->type)) in function _generateDefinitionsTable())

If i start createTables.php in my_generator (look at reproduce code) on a SQLite DB.

createTables create all classes, but without fields (only table names in __table was created).

Even I get

Notice: Undefined property: stdClass::$name in C:\php\PEAR\DB\DataObject\Generator.php on line 345

(line 345 = if (!strlen(trim($t->name))) in function _generateDefinitionsTable())

and

Notice: Undefined property: stdClass::$name in C:\php\PEAR\DB\DataObject\Generator.php on line 473

(line 473 = if (!strlen(trim($t->name))) in function _generateClassTable($input = ''))

I work with DataObject 1.5.3.
phpSQLiteAdmin does work fine with the same DB.