Commit c83c3eb1 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Merge branch 'cherry-pick-f4c6e744' into '1.2.1-fixes'

Merge branch '5789-ldif-import-can-trigger-php-errors-on-empty-file' into '1.2.1-fixes'

See merge request fusiondirectory/fd!343
Showing with 5 additions and 2 deletions
+5 -2
......@@ -1052,8 +1052,9 @@ class LDAP
}
/* Joining lines */
$line = NULL;
$entry = array();
$line = NULL;
$entry = array();
$entries = array();
$entryStart = -1;
foreach ($fileLines as $lineNumber => $fileLine) {
if (preg_match('/^ /', $fileLine)) {
......@@ -1123,6 +1124,8 @@ class LDAP
throw new LDIFImportException(sprintf(_('Error while importing dn: "%s", please check your LDIF from line %s on!'), $entry['dn'][0], $startLine));
}
}
return count($entries);
}
/*! \brief Function to Imports a single entry
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment