Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-36939 cache: instance form validation now handles errors properly

  • Loading branch information...
commit 7d18285720f1e9deaf3c81f7538043e5d4ebcefd 1 parent 0395306
@samhemelryk samhemelryk authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 cache/forms.php
View
8 cache/forms.php
@@ -101,7 +101,13 @@ public function validation($data, $files) {
}
if (method_exists($this, 'configuration_validation')) {
- $errors = $this->configuration_validation($data, $files);
+ $newerrors = $this->configuration_validation($data, $files, $errors);
+ // We need to selectiviliy merge here
+ foreach ($newerrors as $element => $error) {
+ if (!array_key_exists($element, $errors)) {
+ $errors[$element] = $error;
+ }
+ }
}
return $errors;
Please sign in to comment.
Something went wrong with that request. Please try again.