Req #2009 [NEW]: Warning occurs.

From: Date: Wed, 28 Jul 2004 22:52:57 +0000
Subject: Req #2009 [NEW]: Warning occurs.
Groups: php.pear.webmaster 
Request: Send a blank email to pear-webmaster+get-2875@lists.php.net to get a copy of this message
From: elf at php dot net Operating system: Fedora Core 1 PHP version: 4.3.8 Package: Bug System Bug Type: Feature/Change Request Bug description: Warning occurs. Description: ------------ When there is no value in a page, warning occurs. [Thu Jul 29 07:47:09 2004] [error] PHP Warning: Invalid argument supplied for foreach() in /.../pear/HTML/QuickForm/Controller.php on line 413 Patch blow. --- pear/HTML/QuickForm/Controller.php.org 2004-07-29 07:52:10.000000000 +0900 +++ pear/HTML/QuickForm/Controller.php 2004-07-29 07:50:46.000000000 +0900 @@ -410,6 +410,7 @@ } foreach ($pages as $page) { // skip elements representing actions + if ( is_array($data['values'][$page])){ foreach ($data['values'][$page] as $key => $value) { if (0 !== strpos($key, '_qf_')) { if (isset($values[$key]) && is_array($value)) { @@ -419,6 +420,7 @@ } } } + } } return $values; } -- Edit bug report at http://pear.php.net/bugs/bug.php?id=2009&edit=1 --

« previous php.pear.webmaster (#2875) next »