From 99119ea96bb94a4da056f8c1af20ee56a5bf9cc5 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sat, 27 Apr 2013 17:37:04 +0000 Subject: [PATCH] fixed multi-value validation --- lam/lib/baseModule.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lam/lib/baseModule.inc b/lam/lib/baseModule.inc index 096849e4..b2d8eea6 100644 --- a/lam/lib/baseModule.inc +++ b/lam/lib/baseModule.inc @@ -1247,7 +1247,7 @@ abstract class baseModule { $counter = 0; while (isset($_POST[$attrName . '_' . $counter])) { $this->attributes[$attrName][$counter] = $_POST[$attrName . '_' . $counter]; - if (($validationID != null) && !get_preg($this->attributes[$attrName][$counter], $validationID)) { + if (($validationID != null) && ($this->attributes[$attrName][$counter] != '') && !get_preg($this->attributes[$attrName][$counter], $validationID)) { $errors[] = $this->messages[$attrName][0]; } if ($this->attributes[$attrName][$counter] == '') {