Deprecation warnings (with php 7.4)
Sometimes php deprecation errors are displayed.
[Fri May 28 14:51:04.295185 2021] [php7:notice] [pid 41392] [client 195.134.100.15:44694] PHP Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/jexi/html/Jirafeau-4.3.0/lib/functions.php on line 31 [Fri May 28 14:51:04.295206 2021] [php7:notice] [pid 41392] [client 195.134.100.15:44694] PHP Stack trace: [Fri May 28 14:51:04.295213 2021] [php7:notice] [pid 41392] [client 195.134.100.15:44694] PHP 1. {main}() /home/jexi/html/Jirafeau-4.3.0/index.php:0 [Fri May 28 14:51:04.295221 2021] [php7:notice] [pid 41392] [client 195.134.100.15:44694] PHP [Fri May 28 14:51:04.295223 2021] [php7:notice] [pid 41392] [client 195.134.100.15:44694] PHP Dump $_SERVER [Fri May 28 14:51:04.295225 2021] [php7:notice] [pid 41392] [client 195.134.100.15:44694] PHP $_SERVER['REQUEST_URI'] = '/u/' [Fri May 28 14:51:04.295227 2021] [php7:notice] [pid 41392] [client 195.134.100.15:44694] PHP [Fri May 28 14:51:04.295263 2021] [php7:notice] [pid 41392] [client 195.134.100.15:44694] PHP Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/jexi/html/Jirafeau-4.3.0/lib/functions.php on line 71 [Fri May 28 14:51:04.295267 2021] [php7:notice] [pid 41392] [client 195.134.100.15:44694] PHP Stack trace: [Fri May 28 14:51:04.295270 2021] [php7:notice] [pid 41392] [client 195.134.100.15:44694] PHP 1. {main}() /home/jexi/html/Jirafeau-4.3.0/index.php:0 [Fri May 28 14:51:04.295283 2021] [php7:notice] [pid 41392] [client 195.134.100.15:44694] PHP Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/jexi/html/Jirafeau-4.3.0/lib/functions.php on line 71 [Fri May 28 14:51:04.295286 2021] [php7:notice] [pid 41392] [client 195.134.100.15:44694] PHP Stack trace: [Fri May 28 14:51:04.295289 2021] [php7:notice] [pid 41392] [client 195.134.100.15:44694] PHP 1. {main}() /home/jexi/html/Jirafeau-4.3.0/index.php:0 [Fri May 28 14:51:04.295302 2021] [php7:notice] [pid 41392] [client 195.134.100.15:44694] PHP Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/jexi/html/Jirafeau-4.3.0/lib/functions.php on line 76 [Fri May 28 14:51:04.295305 2021] [php7:notice] [pid 41392] [client 195.134.100.15:44694] PHP Stack trace: [Fri May 28 14:51:04.295308 2021] [php7:notice] [pid 41392] [client 195.134.100.15:44694] PHP 1. {main}() /home/jexi/html/Jirafeau-4.3.0/index.php:0 [Fri May 28 14:51:04.295325 2021] [php7:notice] [pid 41392] [client 195.134.100.15:44694] PHP Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/jexi/html/Jirafeau-4.3.0/lib/functions.php on line 80
The fix is simple e.g in line 71 (in lib/functions.php)
for ($i = 0; $i < $size; $i++) {
$b .= $hex2bin{hexdec($num{$i})};
}
must be replaced with $b .= hex2bin[hexdec(
num[$i])];
Apply the same patch in the other deprecated errors also that is
in line 76 the fix is $o = $m[bindec(substr($b, $i, 6))] . $o;
in line 80 $o = $m[bindec(substr($b, 0, $i + 6))] . $o;
in line 31 $p .= $s[$i];
Thanks!