فهرست منبع

- Verification of invalid external fields (i.e fields pointing to a non-existing field in the target class).

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@392 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 15 سال پیش
والد
کامیت
831d6532bb
1فایلهای تغییر یافته به همراه1 افزوده شده و 0 حذف شده
  1. 1 0
      core/attributedef.class.inc.php

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

@@ -1239,6 +1239,7 @@ class AttributeExternalField extends AttributeDefinition
 	{
 		$oKeyAttDef = $this->GetKeyAttDef();
 		$oExtAttDef = MetaModel::GetAttributeDef($oKeyAttDef->Get("targetclass"), $this->Get("target_attcode"));
+		if (!is_object($oExtAttDef)) throw new CoreException("Invalid external field ".$this->GetCode()." in class ".$this->GetHostClass().". The class ".$oKeyAttDef->Get("targetclass")." has no attribute ".$this->Get("target_attcode"));
 		return $oExtAttDef;
 	}