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

:ambulance: fix(archive) Throw an exception when trying to archive a non-existing dn

issue #6088
Showing with 3 additions and 0 deletions
+3 -0
...@@ -177,6 +177,9 @@ class archivedObject extends simplePlugin ...@@ -177,6 +177,9 @@ class archivedObject extends simplePlugin
$attrs[$field] = '*'; $attrs[$field] = '*';
} }
$objects = objects::ls('user', $attrs, $dn, '', FALSE, 'base'); $objects = objects::ls('user', $attrs, $dn, '', FALSE, 'base');
if (empty($objects)) {
throw new NonExistingLdapNodeException('Could not open dn '.$dn);
}
$fdArchivedField = []; $fdArchivedField = [];
foreach ($fields as $field) { foreach ($fields as $field) {
......
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