Explorar o código

#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 %!s(int64=12) %!d(string=hai) anos
pai
achega
f5904fd2ea
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      core/dbobjectsearch.class.php

+ 8 - 0
core/dbobjectsearch.class.php

@@ -128,6 +128,14 @@ class DBObjectSearch
 		{
 			$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);
 		if (!MetaModel::IsParentClass($sCurrClass, $sNewClass))
 		{