Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
Change quickform custom addrule returns (#6332)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
victorvassilev authored May 31, 2018
1 parent 4a702ba commit 336e08c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions www/lib/HTML/QuickForm/HTML_QuickFormCustom.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
Expand Down

0 comments on commit 336e08c

Please sign in to comment.