From 99eccea21f04f9adf29bed123014baee700e98a9 Mon Sep 17 00:00:00 2001 From: rGaillard Date: Mon, 2 Jan 2012 10:11:18 +0000 Subject: [PATCH] // little fix validateController git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11969 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/ObjectModel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/ObjectModel.php b/classes/ObjectModel.php index 75c51478c..bf626c7e8 100644 --- a/classes/ObjectModel.php +++ b/classes/ObjectModel.php @@ -761,8 +761,6 @@ abstract class ObjectModelCore $errors = array(); foreach ($this->def['fields'] as $field => $data) { - if (!isset($data['copy_from_front']) || !$data['copy_from_front']) - continue; /* Checking for required fields */ if (isset($data['required']) && $data['required'] && ($value = Tools::getValue($field, $this->{$field})) == false && (string)$value != '0') if (!$this->id OR $field != 'passwd') @@ -780,6 +778,8 @@ abstract class ObjectModelCore $errors[] = ''.self::displayFieldName($field, get_class($this), $htmlentities).' '.Tools::displayError('is invalid.'); else { + if (!isset($data['copy_from_front']) || !$data['copy_from_front']) + continue; if ($field == 'passwd') { if ($value = Tools::getValue($field))