Apply automated PHP8 safety transforms
Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/89922108-1604-44ae-949d-358d32b9d70a Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
parent
aca850b6cd
commit
e44519c030
465 changed files with 1716 additions and 1716 deletions
|
|
@ -61,7 +61,7 @@ function smarty_function_math($params, $template)
|
|||
// match all vars in equation, make sure all are passed
|
||||
preg_match_all('!(?:0x[a-fA-F0-9]+)|([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)!', $equation, $match);
|
||||
|
||||
foreach ($match[ 1 ] as $curr_var) {
|
||||
foreach ((array)$match[ 1 ] as $curr_var) {
|
||||
if ($curr_var && !isset($params[ $curr_var ]) && !isset($_allowed_funcs[ $curr_var ])) {
|
||||
trigger_error("math: function call $curr_var not allowed", E_USER_WARNING);
|
||||
|
||||
|
|
@ -69,7 +69,7 @@ function smarty_function_math($params, $template)
|
|||
}
|
||||
}
|
||||
|
||||
foreach ($params as $key => $val) {
|
||||
foreach ((array)$params as $key => $val) {
|
||||
if ($key != "equation" && $key != "format" && $key != "assign") {
|
||||
// make sure value is not empty
|
||||
if (strlen($val) == 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue