diff --git a/lib/connector/importldifconnector.php b/lib/connector/importldifconnector.php index 6b489640..ec5b31a2 100755 --- a/lib/connector/importldifconnector.php +++ b/lib/connector/importldifconnector.php @@ -202,7 +202,7 @@ class ImportLdifConnector extends ImportConnector{ // Examining the first element only $parts = $this->getSourceElementsFromFile($file, 1); - if (!$parts) { + if (!$parts || count($parts[0]) == 0) { // Doesn't look like a ldif file return 0; } else { diff --git a/lib/connector/importvcardconnector.php b/lib/connector/importvcardconnector.php index 270aecb4..fb37b5bc 100755 --- a/lib/connector/importvcardconnector.php +++ b/lib/connector/importvcardconnector.php @@ -194,7 +194,7 @@ class ImportVCardConnector extends ImportConnector{ // Examining the first element only $parts = $this->getSourceElementsFromFile($file, 1); - if (!$parts || ($parts && count($parts) == 0)) { + if (!$parts || ($parts && count($parts[0]) == 0)) { // Doesn't look like a vcf file return 0; } else {