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

Bug #4421 DataObject driver raises an error when link fields not set
Submitted: 2005-05-24 21:41 UTC
From: justinpatrin Assigned: asnagy
Status: Closed Package: Structures_DataGrid
PHP Version: Irrelevant OS: Irrelevant
Roadmaps: (Not assigned)    
Subscription  


 [2005-05-24 21:41 UTC] justinpatrin
Description: ------------ When using the formbuilder_integration option in the DataObject driver, if a link field is not set DB_DataObject will raise an error and any error callbacks will be called (or the script will die if using PEAR_ERROR_DIE). This would be best dealt with with exceptions (not going to happen) or by making DB_DataObject extend PEAR in order to allow for expectError (again, probably not going to happen), so we need an extra check in the DataObject driver. On line 232 of Structures/DataGrid/DataSource/DataObject.php the if statement needs two extra extra clauses: if (isset($links[$field]) && isset($linkedDo->$field) && $linkedDo =& $this->_dataobject->getLink($field) && !PEAR::isError($linkedDo)) { $rec[$field] = DB_DataObject_FormBuilder::getDataObjectString($linkedDo); }

Comments

 [2005-05-24 21:46 UTC] justinpatrin
Oops, I messed up one of those new lines. It should be: && isset($this->_dataobject->$field)
 [2005-05-27 14:44 UTC] asnagy
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.