mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-22 09:59:06 +01:00
LSerror::getErrors(): add $reset parameter
This commit is contained in:
parent
c98e31b7c6
commit
087b7e3065
1 changed files with 5 additions and 2 deletions
|
@ -100,17 +100,20 @@ class LSerror {
|
|||
/**
|
||||
* Format current errors message
|
||||
*
|
||||
* @param bool $reset Reset errors (optional, default: true)
|
||||
*
|
||||
* @author Benjamin Renard <brenard@easter-eggs.com>
|
||||
*
|
||||
* @return array Array of formated error messages
|
||||
*/
|
||||
public static function getErrors() {
|
||||
public static function getErrors($reset=true) {
|
||||
$return = (
|
||||
self :: errorsDefined()?
|
||||
$_SESSION['LSerror']:
|
||||
array()
|
||||
);
|
||||
self :: resetError();
|
||||
if ($reset)
|
||||
self :: resetError();
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue