瀏覽代碼

CSV import web service - cosmetics on the reporting in case the data set is empty

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@1067 a333f486-631f-4898-b8df-5754b55c2be0
romainq 14 年之前
父節點
當前提交
7d7df14fc4
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      webservices/import.php

+ 5 - 0
webservices/import.php

@@ -259,6 +259,11 @@ try
 	//
 	// Check parameters format/consistency
 	//
+	if (strlen($sCSVData) == 0)
+	{
+		throw new ExchangeException("Missing data - at least one line is expected");
+	}
+
 	if (!MetaModel::IsValidClass($sClass))
 	{
 		throw new BulkLoadException("Unknown class: '$sClass'");