Fixed Call to undefined function each()

This commit is contained in:
Rooty 2021-09-27 05:30:00 +02:00
parent 3ffc3ef364
commit b82e879608

View File

@ -180,12 +180,14 @@ class ErrorManager {
if ($this -> errorAlarme) {
$tab = explode(',', $this -> errorAlarme);
while (list($key, $val) = each($tab)){
if (! preg_match('/^(.+)@(.+)\.(.+)$/s', $val)) {
$message .= "<p style='color:red;'>Your ERROR_MANAGER_ALARME mails configurations has got a mistake and was disabled.</p>";
$this -> errorAlarme = '';
}
// while (list($key, $val) = each($tab)){
foreach($tab as $key => $val)
{
if (! preg_match('/^(.+)@(.+)\.(.+)$/s', $val)) {
$message .= "<p style='color:red;'>Your ERROR_MANAGER_ALARME mails configurations has got a mistake and was disabled.</p>";
$this -> errorAlarme = '';
}
}
$server = getenv("HTTP_HOST");
$script = getenv("SCRIPT_NAME");
$mess = 'ErrorMessage from "'.$server.'" server and "'.$script."\" script.\n\n".$message;