瀏覽代碼

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 年之前
父節點
當前提交
f777982798
共有 1 個文件被更改,包括 4 次插入0 次删除
  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));
 	}