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

:ambulance: fix(ldap) Return number of entry imported and avoid PHP errors

issue #5789
Showing with 5 additions and 2 deletions
+5 -2
......@@ -1016,8 +1016,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)) {
......@@ -1087,6 +1088,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