From 283f7dc9f8b83379755b7d4bc09caacd6357f274 Mon Sep 17 00:00:00 2001 From: Romain Quetiez Date: Thu, 3 Feb 2011 15:50:48 +0000 Subject: [PATCH] CSV import web service - cosmetics on the reporting in case the data set is empty SVN:trunk[1067] --- webservices/import.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/webservices/import.php b/webservices/import.php index dee36f50b..17699e10a 100644 --- a/webservices/import.php +++ b/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'");