Home » Database » DB_DataObject » Bug #3312
DO_DataPbject::fetch() crashes in command line
Details
| Submitted | 2005-01-27 13:48 UTC |
|---|---|
| From | tchoudinov at yahoo dot com |
| Status | Bogus |
| Package | DB_DataObject |
| PHP Version | 4.3.9 |
| OS | Win2000 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