浏览代码

#702 The second implementation of this fix was still incomplete (not compatible with some constraint queries)

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@2694 a333f486-631f-4898-b8df-5754b55c2be0
romainq 12 年之前
父节点
当前提交
f5904fd2ea
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      core/dbobjectsearch.class.php

+ 8 - 0
core/dbobjectsearch.class.php

@@ -128,6 +128,14 @@ class DBObjectSearch
 		{
 		{
 			$sAlias = $this->GetClassAlias();
 			$sAlias = $this->GetClassAlias();
 		}
 		}
+		else
+		{
+			if (!array_key_exists($sAlias, $this->m_aClasses))
+			{
+				// discard silently - necessary when recursing on the related nodes (see code below)
+				return;
+			}
+		}
 		$sCurrClass = $this->GetClassName($sAlias);
 		$sCurrClass = $this->GetClassName($sAlias);
 		if (!MetaModel::IsParentClass($sCurrClass, $sNewClass))
 		if (!MetaModel::IsParentClass($sCurrClass, $sNewClass))
 		{
 		{