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

Avoid a PHP error in msgPool in corner cases

parent 77408346
No related merge requests found
Showing with 6 additions and 4 deletions
+6 -4
...@@ -691,17 +691,19 @@ class msgPool { ...@@ -691,17 +691,19 @@ class msgPool {
_('delete operation'), _('search operation'), _('authentication')); _('delete operation'), _('search operation'), _('authentication'));
if (isset($typemap[$type])) { if (isset($typemap[$type])) {
$headline = sprintf(_('LDAP %s failed!'), $typemap[$type]); $msg = sprintf(_('LDAP %s failed!'), $typemap[$type]);
} else { } else {
$headline = _('LDAP operation failed!'); $msg = _('LDAP operation failed!');
} }
/* Fill DN information */ /* Fill DN information */
if ($dn != '') { if ($dn != '') {
$dn_info = '<br/><br/><i>'._('Object').':</i> '.$dn; $msg .= '<br/><br/><i>'._('Object').':</i> '.$dn;
} }
return $headline.$dn_info.'<br/><br/><i>'._('Error').':</i> '.$error; $msg .= '<br/><br/><i>'._('Error').':</i> '.$error;
return $msg;
} }
/*! /*!
......
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