浏览代码

Internal - MFFactory: fixed GetDelta when there is no change at all

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3792 a333f486-631f-4898-b8df-5754b55c2be0
romainq 9 年之前
父节点
当前提交
6b9dfa305a
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      setup/modelfactory.class.inc.php

+ 4 - 1
setup/modelfactory.class.inc.php

@@ -1085,7 +1085,10 @@ EOF
 		{
 			foreach ($aAttributes as $sAttribute => $value)
 			{
-				$oDelta->documentElement->setAttribute($sAttribute, $value);
+				if ($oDelta->documentElement) // yes, this may happen when still no change has been performed (and a module has been selected for installation)
+				{
+					$oDelta->documentElement->setAttribute($sAttribute, $value);
+				}
 			}
 		}
 		return $oDelta;