From 952d59e0f411806b3c9c659e9d8aba2d1b382f28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come@opensides.be> Date: Wed, 5 Apr 2017 09:45:34 +0200 Subject: [PATCH] Avoid a PHP error in msgPool in corner cases --- include/class_msgPool.inc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/include/class_msgPool.inc b/include/class_msgPool.inc index cac3a0a44..ce4d2ab05 100644 --- a/include/class_msgPool.inc +++ b/include/class_msgPool.inc @@ -691,17 +691,19 @@ class msgPool { _('delete operation'), _('search operation'), _('authentication')); if (isset($typemap[$type])) { - $headline = sprintf(_('LDAP %s failed!'), $typemap[$type]); + $msg = sprintf(_('LDAP %s failed!'), $typemap[$type]); } else { - $headline = _('LDAP operation failed!'); + $msg = _('LDAP operation failed!'); } /* Fill DN information */ 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; } /*! -- GitLab