[Web] Various PHP 8 fixes, partly fixes #4219

This commit is contained in:
andryyy
2021-08-09 08:28:22 +02:00
parent 7e958c9b26
commit 2cd0b56b14
15 changed files with 524 additions and 506 deletions

View File

@@ -1,7 +1,7 @@
<?php
function relayhost($_action, $_data = null) {
global $pdo;
global $lang;
global $pdo;
global $lang;
$_data_log = $_data;
switch ($_action) {
case 'add':
@@ -45,7 +45,7 @@ function relayhost($_action, $_data = null) {
$_SESSION['return'][] = array(
'type' => 'success',
'log' => array(__FUNCTION__, $_action, $_data_log),
'msg' => array('relayhost_added', htmlspecialchars(implode(', ', $hosts)))
'msg' => array('relayhost_added', htmlspecialchars(implode(', ', (array)$hosts)))
);
break;
case 'edit':
@@ -100,7 +100,7 @@ function relayhost($_action, $_data = null) {
$_SESSION['return'][] = array(
'type' => 'success',
'log' => array(__FUNCTION__, $_action, $_data_log),
'msg' => array('object_modified', htmlspecialchars(implode(', ', $hostnames)))
'msg' => array('object_modified', htmlspecialchars(implode(', ', (array)$hostnames)))
);
}
break;
@@ -177,8 +177,8 @@ function relayhost($_action, $_data = null) {
}
}
function transport($_action, $_data = null) {
global $pdo;
global $lang;
global $pdo;
global $lang;
$_data_log = $_data;
switch ($_action) {
case 'add':
@@ -307,7 +307,7 @@ function transport($_action, $_data = null) {
$_SESSION['return'][] = array(
'type' => 'success',
'log' => array(__FUNCTION__, $_action, $_data_log),
'msg' => array('relayhost_added', htmlspecialchars(implode(', ', $hosts)))
'msg' => array('relayhost_added', htmlspecialchars(implode(', ', (array)$hosts)))
);
break;
case 'edit':
@@ -442,7 +442,7 @@ function transport($_action, $_data = null) {
$_SESSION['return'][] = array(
'type' => 'success',
'log' => array(__FUNCTION__, $_action, $_data_log),
'msg' => array('object_modified', htmlspecialchars(implode(', ', $hostnames)))
'msg' => array('object_modified', htmlspecialchars(implode(', ', (array)$hostnames)))
);
}
break;
@@ -505,4 +505,4 @@ function transport($_action, $_data = null) {
return $transportdata;
break;
}
}
}