mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-18 22:43:47 +01:00
LSerror: format error message at adding time
Format error message at adding time to make sure to be able to format it, even if the component triggered it is not loaded.
This commit is contained in:
parent
b0b50c51e4
commit
3ce495c2c3
1 changed files with 2 additions and 2 deletions
|
@ -69,7 +69,7 @@ class LSerror {
|
||||||
* @retval void
|
* @retval void
|
||||||
*/
|
*/
|
||||||
public static function addErrorCode($code=null, $msg=null, $escape=true) {
|
public static function addErrorCode($code=null, $msg=null, $escape=true) {
|
||||||
$_SESSION['LSerror'][] = array($code, $msg, $escape);
|
$_SESSION['LSerror'][] = self :: formatError($code, $msg, $escape);
|
||||||
if (class_exists('LSlog'))
|
if (class_exists('LSlog'))
|
||||||
LSlog :: error(self :: formatError($code, $msg, $escape, 'addslashes'));
|
LSlog :: error(self :: formatError($code, $msg, $escape, 'addslashes'));
|
||||||
}
|
}
|
||||||
|
@ -127,7 +127,7 @@ class LSerror {
|
||||||
if(!empty($_SESSION['LSerror'])) {
|
if(!empty($_SESSION['LSerror'])) {
|
||||||
$txt = '';
|
$txt = '';
|
||||||
foreach ($_SESSION['LSerror'] as $error)
|
foreach ($_SESSION['LSerror'] as $error)
|
||||||
$txt .= call_user_func_array(array('LSerror', 'formatError'), $error)."<br />\n";
|
$txt .= $error."<br />\n";
|
||||||
self :: resetError();
|
self :: resetError();
|
||||||
return $txt;
|
return $txt;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue