Pārlūkot izejas kodu

Custom fields: solidified the internal APIs against creative usages (null =>default value)

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@4248 a333f486-631f-4898-b8df-5754b55c2be0
romainq 9 gadi atpakaļ
vecāks
revīzija
f777982798
1 mainītis faili ar 4 papildinājumiem un 0 dzēšanām
  1. 4 0
      core/attributedef.class.inc.php

+ 4 - 0
core/attributedef.class.inc.php

@@ -6968,6 +6968,10 @@ class AttributeCustomFields extends AttributeDefinition
 		{
 			return new ormCustomFieldsValue($oHostObject, $this->GetCode(), $proposedValue);
 		}
+		elseif (is_null($proposedValue))
+		{
+			return new ormCustomFieldsValue($oHostObject, $this->GetCode());
+		}
 		throw new Exception('Unexpected type for the value of a custom fields attribute: '.gettype($proposedValue));
 	}