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 #3312

DO_DataPbject::fetch() crashes in command line

Details

Submitted2005-01-27 13:48 UTC
Fromtchoudinov at yahoo dot com
StatusBogus
PackageDB_DataObject
PHP Version4.3.9
OSWin2000 server SP4
Roadmaps(Not assigned)

Comments

[2005-01-27 13:48 UTC] tchoudinov at yahoo dot com

Description:
------------
The very simple code with method DataObject::fetch() does not work in command line. Method fetch() looses $this pointer and crashes.

Reproduce code:
---------------
Any simple code with fetch in command line:
-----------------------
$object = new mytable();
$object->name = "fred";
$object->find();
$store = array();
while ($object->fetch()) {
echo $this->ID;
$store[] = $object; // builds an array of object lines.
}
------------------------

Expected result:
----------------
The same result as with web server is expected. Fetch should work.

Actual result:
--------------
Fetch method has no $this pointer for unknown reasons in the very beginning of the method. As a result fetch does not work in CLI at all.

[2005-01-27 14:28 UTC] tchoudinov at yahoo dot com

The same error result is with any php versions from 4.3.5 to 4.3.10