cvs: pear /HTML_QuickForm QuickForm.php
| From: | Bertrand Mansion | Date: | Sun, 15 Dec 2002 11:44:33 +0000 |
| Subject: | cvs: pear /HTML_QuickForm QuickForm.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-7894@lists.php.net to get a copy of this message | ||
mansion Sun Dec 15 06:44:33 2002 EDT
Modified files:
/pear/HTML_QuickForm QuickForm.php
Log:
Fix bug in applyFilter as spotted by <entis at poczta.fm>
Index: pear/HTML_QuickForm/QuickForm.php
diff -u pear/HTML_QuickForm/QuickForm.php:1.48 pear/HTML_QuickForm/QuickForm.php:1.49
--- pear/HTML_QuickForm/QuickForm.php:1.48 Fri Dec 13 18:21:39 2002
+++ pear/HTML_QuickForm/QuickForm.php Sun Dec 15 06:44:32 2002
@@ -17,7 +17,7 @@
// | Bertrand Mansion <bmansion@mamasam.com> |
// +----------------------------------------------------------------------+
//
-// $Id: QuickForm.php,v 1.48 2002/12/13 23:21:39 mansion Exp $
+// $Id: QuickForm.php,v 1.49 2002/12/15 11:44:32 mansion Exp $
require_once('PEAR.php');
require_once('HTML/Common.php');
@@ -917,8 +917,10 @@
if ($element == '__ALL__') {
$this->_submitValues = $this->_recursiveFilter($filterData);
} else {
- if (isset($this->_submitValues[$element])) {
- $this->_submitValues[$element] = $this->_recursiveFilter($filterData,
$this->_submitValues[$element]);
+ if ($this->elementExists($element)) {
+ if (isset($this->_submitValues[$element])) {
+ $this->_submitValues[$element] = $this->_recursiveFilter($filterData,
$this->_submitValues[$element]);
+ }
} else {
return PEAR::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING,
"Element '$element' does not exist in HTML_QuickForm::applyFilter()",
'HTML_QuickForm_Error', true);
}