From 336e08cbe808a5cc08c006a03205ab940a57ee16 Mon Sep 17 00:00:00 2001 From: victorvassilev Date: Thu, 31 May 2018 10:03:06 +0300 Subject: [PATCH] Change quickform custom addrule returns (#6332) * refactor(quickFormCustom): change error type of applyfilter Change fatal error to notice to comply with previous version error type all over the code. * refactor(quickform): update quickform custom stop execution if element not found --- www/lib/HTML/QuickForm/HTML_QuickFormCustom.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/www/lib/HTML/QuickForm/HTML_QuickFormCustom.php b/www/lib/HTML/QuickForm/HTML_QuickFormCustom.php index 377b8deb405..0460d9e4b4d 100644 --- a/www/lib/HTML/QuickForm/HTML_QuickFormCustom.php +++ b/www/lib/HTML/QuickForm/HTML_QuickFormCustom.php @@ -161,10 +161,12 @@ public function addRule($element, $message, $type, $format=null, $validation='se if (!$force) { if (!is_array($element) && !$this->elementExists($element)) { trigger_error("Element '$element' does not exist"); + return; } elseif (is_array($element)) { foreach ($element as $el) { if (!$this->elementExists($el)) { trigger_error("Element '$el' does not exist"); + return; } } }