From 9c390d62edec6ccc80c6866366ca857765bdb5d4 Mon Sep 17 00:00:00 2001 From: Tim Lock Date: Fri, 20 Sep 2013 09:45:26 +0930 Subject: [PATCH] MDL-41908 QuickForm: Fix PEAR Non-static method error --- lib/pear/HTML/QuickForm.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/pear/HTML/QuickForm.php b/lib/pear/HTML/QuickForm.php index af116b29aba..6da6ff4b1ad 100644 --- a/lib/pear/HTML/QuickForm.php +++ b/lib/pear/HTML/QuickForm.php @@ -600,7 +600,8 @@ class HTML_QuickForm extends HTML_Common { } else { $args = func_get_args(); $elementObject =& $this->_loadElement('addElement', $element, array_slice($args, 1)); - if (@PEAR::isError($elementObject)) { + $pear = new PEAR(); + if ($pear->isError($elementObject)) { return $elementObject; } } @@ -1875,7 +1876,8 @@ class HTML_QuickForm extends HTML_Common { } foreach ($elementList as $elementName) { $value = $this->exportValue($elementName); - if (PEAR::isError($value)) { + $pear = new PEAR(); + if ($pear->isError($value)) { return $value; } $values[$elementName] = $value; -- 2.43.0