Fix PHP 8 related issues
This commit is contained in:
parent
0257f25e92
commit
f9ee642682
|
@ -98,11 +98,13 @@ class FormController {
|
||||||
,'mailaccept' => array('filter' => FILTER_DEFAULT, 'flags' => FILTER_FORCE_ARRAY)
|
,'mailaccept' => array('filter' => FILTER_DEFAULT, 'flags' => FILTER_FORCE_ARRAY)
|
||||||
), true);
|
), true);
|
||||||
|
|
||||||
|
if (!empty(self::$form['mailaccept'])) {
|
||||||
self::$form['mailaccept'] = array_map(function($value) {
|
self::$form['mailaccept'] = array_map(function($value) {
|
||||||
if (!empty($value)) {
|
if (!empty($value)) {
|
||||||
return $value.'@'.self::$form['domain'];
|
return $value.'@'.self::$form['domain'];
|
||||||
}
|
}
|
||||||
}, self::$form['mailaccept']);
|
}, self::$form['mailaccept']);
|
||||||
|
}
|
||||||
|
|
||||||
if (!empty(self::$form['password'])) { self::filterPassword(); }
|
if (!empty(self::$form['password'])) { self::filterPassword(); }
|
||||||
|
|
||||||
|
|
|
@ -60,12 +60,14 @@ class PageController {
|
||||||
if (!empty($_GET['domain']) && in_array($_GET['domain'], $allowed_params)) { self::$params['domain'] = $_GET['domain']; }
|
if (!empty($_GET['domain']) && in_array($_GET['domain'], $allowed_params)) { self::$params['domain'] = $_GET['domain']; }
|
||||||
if (!empty($_GET['account']) && in_array($_GET['account'], $allowed_params)) { self::$params['account'] = $_GET['account']; }
|
if (!empty($_GET['account']) && in_array($_GET['account'], $allowed_params)) { self::$params['account'] = $_GET['account']; }
|
||||||
if (!empty($_GET['alias']) && in_array($_GET['alias'], $allowed_params)) { self::$params['alias'] = $_GET['alias']; }
|
if (!empty($_GET['alias']) && in_array($_GET['alias'], $allowed_params)) { self::$params['alias'] = $_GET['alias']; }
|
||||||
|
if (!empty($_GET['domain'])) {
|
||||||
self::$params = array_merge(filter_input_array(INPUT_GET, array(
|
self::$params = array_merge(filter_input_array(INPUT_GET, array(
|
||||||
'domain' => FILTER_SANITIZE_URL
|
'domain' => FILTER_SANITIZE_URL
|
||||||
,'account' => FILTER_SANITIZE_EMAIL
|
,'account' => FILTER_SANITIZE_EMAIL
|
||||||
,'alias' => array('filter' => FILTER_SANITIZE_STRING, 'flags' => FILTER_FLAG_STRIP_HIGH)
|
,'alias' => array('filter' => FILTER_SANITIZE_STRING, 'flags' => FILTER_FLAG_STRIP_HIGH)
|
||||||
), true)
|
), true)
|
||||||
, self::$params);
|
, self::$params);
|
||||||
|
}
|
||||||
|
|
||||||
unset($_GET);
|
unset($_GET);
|
||||||
//die(var_dump(self::$params));
|
//die(var_dump(self::$params));
|
||||||
|
@ -97,7 +99,7 @@ class PageController {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function logout() {
|
private static function logout() {
|
||||||
session_unset('EVOADMIN_SESS');
|
session_unset();
|
||||||
session_destroy();
|
session_destroy();
|
||||||
print self::$twig->render('login.html', array(
|
print self::$twig->render('login.html', array(
|
||||||
'page_name' => Config::getName().' - Login'
|
'page_name' => Config::getName().' - Login'
|
||||||
|
|
Loading…
Reference in a new issue