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 » Structures » Structures_DataGrid_DataSource_DataObject » Bug #10203

Error message from DO in count

Details

Submitted2007-02-27 10:46 UTC
Fromvalberg at hi dot is
Assignedolivierg
StatusBogus
PackageStructures_DataGrid_DataSource_DataObject
PHP Version4.3.9
OSLinux
Roadmaps(Not assigned)

Comments

[2007-02-27 10:46 UTC] valberg at hi dot is

Description:
------------
When using this datasource driver I get an error message from DB/DataObject.

Test script:
---------------
/* Instantiate */
$dataobject = new DataObject_Fruits();
$datagrid =& new Structures_DataGrid(10);

/* Bind */
$bound = $datagrid->bind($dataobject);

Expected result:
----------------
A table with by data.

Actual result:
--------------
Notice: Undefined offset: 0 in /usr/share/pear/DB/DataObject.php on line 1512
DB_DataObject Error: You cannot do run count without keys - use $do->keys('id');

Fixed this error by adding:
$this->_dataobject->keys('id');
to line 294 in DataSource/DataObject.php