Skip to content
Snippets Groups Projects
Commit f389be55 authored by Ruud's avatar Ruud Committed by Markus Klein
Browse files

[BUGFIX] Check if validationrules are set before foreach statement

The ValidationUtility now checks if there are any rules set,
before trying to use the variable in the foreach loop.

Resolves: #66508
Releases: master, 6.2
Change-Id: I201986d88666d8de8a84de6581d2ea06da7374c2
Reviewed-on: http://review.typo3.org/38846


Reviewed-by: default avatarMarkus Klein <klein.t3@reelworx.at>
Tested-by: default avatarMarkus Klein <klein.t3@reelworx.at>
parent 8f08b50e
No related merge requests found
......@@ -116,7 +116,7 @@ class ValidatorUtility implements \TYPO3\CMS\Core\SingletonInterface {
$this->errors[$prefix] = array();
$result = TRUE;
if (is_array($this->rules[$prefix])) {
foreach ($this->rules[$prefix] as $key => $element) {
foreach ($this->rules[$prefix] as $key => $element) {
/* @var $rule AbstractValidator */
$rule = $element['instance'];
$fieldName = $element['fieldName'];
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment