diff --git a/admin/tool/lp/classes/persistent.php b/admin/tool/lp/classes/persistent.php index 84b2c55afe9..3dedc8d95db 100644 --- a/admin/tool/lp/classes/persistent.php +++ b/admin/tool/lp/classes/persistent.php @@ -533,12 +533,12 @@ abstract class persistent { final public function validate() { global $CFG; + // Before validate hook. + $this->before_validate(); + // If this object has not been validated yet. if ($this->validated !== true) { - // Before validate hook. - $this->before_validate(); - $errors = array(); $properties = static::properties_definition(); foreach ($properties as $property => $definition) {