From f36446fe43107653143ab8bb8dc9d84368a773bc Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Fri, 5 Jun 2020 16:00:59 +0200 Subject: [PATCH] PHP 7.4 --- lam/lib/account.inc | 2 +- lam/lib/config.inc | 2 +- lam/templates/3rdParty/pla/lib/TemplateRender.php | 2 +- lam/templates/3rdParty/pla/lib/export_functions.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lam/lib/account.inc b/lam/lib/account.inc index 1fa8dabf..2e4f2322 100644 --- a/lam/lib/account.inc +++ b/lam/lib/account.inc @@ -227,7 +227,7 @@ function generateSalt($len) { $salt = ''; for ($i = 0; $i < $len; $i++) { $pos = abs(getRandomNumber() % strlen($chars)); - $salt .= $chars{$pos}; + $salt .= $chars[$pos]; } return $salt; } diff --git a/lam/lib/config.inc b/lam/lib/config.inc index 87616d83..3e0a21fd 100644 --- a/lam/lib/config.inc +++ b/lam/lib/config.inc @@ -128,7 +128,7 @@ function checkChmod($right, $target, $chmod) { } // Cut the number from the chmod: - $chmod_num = $chmod{$chmod_num}; + $chmod_num = $chmod[$chmod_num]; // Now check, if the chmod_num can be right with the $right // What numbers allow "read" diff --git a/lam/templates/3rdParty/pla/lib/TemplateRender.php b/lam/templates/3rdParty/pla/lib/TemplateRender.php index 19c384d9..18a79e7e 100644 --- a/lam/templates/3rdParty/pla/lib/TemplateRender.php +++ b/lam/templates/3rdParty/pla/lib/TemplateRender.php @@ -189,7 +189,7 @@ class TemplateRender extends PageRender { $next_number = $vals; foreach ($mod as $calc) { - $operand = $calc{0}; + $operand = $calc[0]; $operator = substr ($calc,1); switch ($operand) { diff --git a/lam/templates/3rdParty/pla/lib/export_functions.php b/lam/templates/3rdParty/pla/lib/export_functions.php index cb576047..45d3ece2 100644 --- a/lam/templates/3rdParty/pla/lib/export_functions.php +++ b/lam/templates/3rdParty/pla/lib/export_functions.php @@ -217,7 +217,7 @@ abstract class Export { */ protected function isSafeAscii($str) { for ($i=0;$i 127) + if (ord($str[$i]) < 32 || ord($str[$i]) > 127) return false; return true;