Explorar o código

Fixed regression on AttributeInteger

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@1088 a333f486-631f-4898-b8df-5754b55c2be0
romainq %!s(int64=14) %!d(string=hai) anos
pai
achega
26411ff441
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      core/attributedef.class.inc.php

+ 1 - 1
core/attributedef.class.inc.php

@@ -567,7 +567,7 @@ class AttributeInteger extends AttributeDBField
 	public function MakeRealValue($proposedValue)
 	{
 		if (is_null($proposedValue)) return null;
-		if ($proposedValue == '') return null;
+		if ($proposedValue === '') return null; // 0 is transformed into '' !
 		return (int)$proposedValue;
 	}