Parcourir la source

fixed fetch p5 attributes for field values map

Piotr Labudda il y a 10 ans
Parent
commit
4473ab3187
1 fichiers modifiés avec 5 ajouts et 3 suppressions
  1. 5 3
      SE/se-lib/TableAcl.php

+ 5 - 3
SE/se-lib/TableAcl.php

@@ -1424,9 +1424,11 @@ class TableAcl {
 		";
 		";
 		$res = $db->query($sql);
 		$res = $db->query($sql);
 		while ($r = $db->fetch($res)) {
 		while ($r = $db->fetch($res)) {
-			$valuesMap = V::get('valuesMap', array(), $attributes[$r->field_name]);
-			$valuesMap[$r->value] = $r->label;
-			$attributes[$r->field_name]['valuesMap'] = $valuesMap;
+			if (!empty($r->value) && !empty($r->label)) {
+				$valuesMap = V::get('valuesMap', array(), $attributes[$r->field_name]);
+				$valuesMap[$r->value] = $r->label;
+				$attributes[$r->field_name]['valuesMap'] = $valuesMap;
+			}
 		}
 		}
 		return $attributes;
 		return $attributes;
 	}
 	}