Quellcode durchsuchen

Protect against empty list of reconciliation keys

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@1819 a333f486-631f-4898-b8df-5754b55c2be0
dflaven vor 13 Jahren
Ursprung
Commit
fb12081f1c
1 geänderte Dateien mit 2 neuen und 1 gelöschten Zeilen
  1. 2 1
      pages/ajax.csvimport.php

+ 2 - 1
pages/ajax.csvimport.php

@@ -347,6 +347,7 @@ try
 			$aMoreReconciliationKeys = array(); // Store: key => void to automatically remove duplicates
 			foreach($aReconciliationKeys as $sAttCode)
 			{
+				if (!MetaModel::IsValidAttCode($sClassName, $sAttCode)) continue;
 				$oAttDef = MetaModel::GetAttributeDef($sClassName, $sAttCode);
 				if ($oAttDef->IsExternalKey())
 				{
@@ -403,7 +404,7 @@ EOF
 		}
 		else
 		{
-			$oPage = new ajax_page("");
+			$oPage = new ajax_page("Class $sClassName is not a valid class !");
 		}
 		break;
 	}