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 05:07 UTC Modified: 2006-12-16 02:21 UTC
From: lobbin Assigned: justinpatrin
Status: Closed Package: DB_DataObject_FormBuilder
PHP Version: 4.3.10 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2005-03-24 05: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 10: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 11: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 12: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.