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

Bug #2128 Record_DataObject does not return an error when passed junk
Submitted: 2004-08-15 15:06 UTC
From: ylf at xung dot org Assigned: asnagy
Status: Closed Package: Structures_DataGrid
PHP Version: 4.3.4 OS: Linux Debian (testing)
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 50 - 10 = ?

 
 [2004-08-15 15:06 UTC] ylf at xung dot org
Description: ------------ In this constructor, you state : $this->setRecord($data); where data is the DataObject. Then, the setRecord() method, in case the passed data is not a DataObject, triggers : return new PEAR_Error('Invalid data type. ' . 'Data must be of type DB_DataObject'); But the constructor does not return this PEAR_Error object, it just calls setRecord(), and as a constructor, AFAIK it can't return anything but an instance of Record_DataObject. I think the solution is to make the base Record class extend PEAR and then use $this->raiseError().

Comments

 [2004-08-16 16:00 UTC] asnagy at webitecture dot org
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.