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

Bug #3715 Emtpy parameter list for formatter gives warning
Submitted: 2005-03-05 23:03 UTC
From: xolphin Assigned: asnagy
Status: Closed Package: Structures_DataGrid
PHP Version: 5.0.3 OS: Irrelevant
Roadmaps: (Not assigned)    
Subscription  


 [2005-03-05 23:03 UTC] xolphin
Description: ------------ When providing an emtpy parameter list for a formatter, a notice "Undefined variable: in Column.php on line 183" is being generated. Reproduce code: --------------- $dg->addColumn(new Structures_DataGrid_Column('Field', 'Field', 'Field', array('width' => '50'), null, 'Printer::Demo()')); function Demo($params) { extract($params); if ($record['Field'] > 0 ) { return 'Possitive number; } else { return 'Negative number'; } } Expected result: ---------------- No errors Actual result: -------------- "Undefined variable: in Column.php on line 183" I fixed the problem in Column.php on line 172 by changing: $parameters = split(',', $parameters); to if ($parameters == '') { $parameters = array(); } else { $parameters = split(',', $parameters); }

Comments

 [2005-03-18 20:49 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.