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

Bug #3941 Warning-message when using latest version
Submitted: 2005-03-24 10:07 UTC
From: lobbin Assigned: justinpatrin
Status: Closed Package: DB_DataObject_FormBuilder
PHP Version: 4.3.10 OS:
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 : 39 - 25 = ?

 
 [2005-03-24 10:07 UTC] lobbin
Description: ------------ Since upgrading to 0.12.1 of FormBuilder, I get this Warning-message: Warning: Invalid argument supplied for foreach() in /usr/share/pear/DB/DataObject/FormBuilder.php on line 1725 The method causing the error is getForm as far as I can see without going any deeper in the code. Reproduce code: --------------- $so = &DB_DataObject::factory('spotoffers'); $fg = &DB_DataObject_FormBuilder::create($so); $form =& $fg->getForm();

Comments

 [2005-03-24 15:59 UTC] mw21st
Hey there, can you please provide some more info? We'll need your FormBuilder configuration settings, the section of your .links.ini that corresponds to the table you want to generate the form for and maybe an excerpt from the DataObject you want to use, which shows the configuration settings made there using the $fb_* properties. Thanks, Markus
 [2005-03-24 16:31 UTC] lobbin
These are my settings from my DO-class. $this->fb_addFormHeader = false; $this->fb_createSubmit = false; $this->fb_dateTimeElementFormat = 'Y-m-d H:i'; $this->fb_fieldsToRender = array('status', 'description', 'headline', 'data', 'start', 'end', 'align'); $this->fb_preDefOrder = array('description', 'status'); $this->fb_textFields = array('data'); I don't have a .links.ini, maybe thats where the problem is? Haven't got around to look at the FB code yet :(
 [2005-03-24 17:18 UTC] justinpatrin
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. This is due to DB_DataObject's return of null when no links.ini is found. I asked Markus to change it to array(), but he didn't.