diff --git a/lib/Cake/Model/ModelValidator.php b/lib/Cake/Model/ModelValidator.php index 1a193793935..82e185eedb7 100644 --- a/lib/Cake/Model/ModelValidator.php +++ b/lib/Cake/Model/ModelValidator.php @@ -247,7 +247,7 @@ public function validateMany(&$data, $options = array()) { * @see ModelValidator::validates() */ public function errors($options = array()) { - if (!$this->_triggerBeforeValidate($options)) { + if (!$this->_triggerBeforeValidate(&$options)) { return false; } $model = $this->getModel(); @@ -464,7 +464,7 @@ protected function _validateWithModels($options) { */ protected function _triggerBeforeValidate($options = array()) { $model = $this->getModel(); - $event = new CakeEvent('Model.beforeValidate', $model, array($options)); + $event = new CakeEvent('Model.beforeValidate', $model, array(&$options)); list($event->break, $event->breakOn) = array(true, false); $model->getEventManager()->dispatch($event); if ($event->isStopped()) {