Merge branch 'wip-MDL-36939-m25' of git://github.com/samhemelryk/moodle
authorDan Poltawski <dan@moodle.com>
Mon, 10 Dec 2012 03:08:42 +0000 (11:08 +0800)
committerDan Poltawski <dan@moodle.com>
Mon, 10 Dec 2012 03:08:42 +0000 (11:08 +0800)
cache/forms.php

index 533f1f8..542e7a0 100644 (file)
@@ -101,7 +101,13 @@ class cachestore_addinstance_form extends moodleform {
         }
 
         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;