Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.9.3

Bug #3607 Binding to null datasets causes fatal error
Submitted: 2005-02-26 16:20 UTC
From: nick at foobar dot org Assigned: asnagy
Status: Closed Package: Structures_DataGrid
PHP Version: 4.3.10 OS: FreeBSD
Roadmaps: (Not assigned)    
Subscription  


 [2005-02-26 16:20 UTC] nick at foobar dot org
Description: ------------ Using Structures::DataGrid 0.6.0 (and have tried 0.6.2) Reproduce code: --------------- <?php require_once 'Structures/DataGrid.php'; $res =& $peardb->query('SELECT * FROM blahtable WHERE 1=0'); while ($record = $res->fetchRow()) { $dataSet[] = $record; } $dg =& new Structures_DataGrid(20, 1); $dg->bind($dataSet); print $dg->renderer->toHTML(); ?> Expected result: ---------------- The code should fail gracefully with some form of recoverable error. Better still, there should be some way of specifying a callback for what should happen when a null data set is specified. Actual result: -------------- Fatal error: Call to a member function on a non-object in /usr/local/share/pear/Structures/DataGrid/DataSource/DataObject.php on line 206

Comments

 [2005-03-07 17:43 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2005-03-30 15:45 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!