From 2bc76d8baee16b7ba0814c12da52c665158a6d98 Mon Sep 17 00:00:00 2001
From: Nicky Galliano <velhenn@gmail.com>
Date: Fri, 5 Feb 2021 10:11:06 +0000
Subject: [PATCH 1/1] Update functions.php. Following the update to php 8, I
 got the following debug error when trying to access my instance : "Array and
 string offset access syntax with curly braces is no longer supported in
 [...]/jirafeau/lib/functions.php on line 31" I just changed the deprecated
 curly braces into brackets and I was good to go.

---
 lib/functions.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/functions.php b/lib/functions.php
index a4f9ec6..f564db6 100644
--- a/lib/functions.php
+++ b/lib/functions.php
@@ -28,7 +28,7 @@ function s2p($s)
     $block_size = 8;
     $p = '';
     for ($i = 0; $i < strlen($s); $i++) {
-        $p .= $s{$i};
+        $p .= $s[$i];
         if (($i + 1) % $block_size == 0) {
             $p .= '/';
         }
@@ -68,16 +68,16 @@ function base_16_to_64($num)
     # Convert long hex string to bin.
     $size = strlen($num);
     for ($i = 0; $i < $size; $i++) {
-        $b .= $hex2bin{hexdec($num{$i})};
+        $b .= $hex2bin[hexdec($num[$i])];
     }
     # Convert long bin to base 64.
     $size *= 4;
     for ($i = $size - 6; $i >= 0; $i -= 6) {
-        $o = $m{bindec(substr($b, $i, 6))} . $o;
+        $o = $m[bindec(substr($b, $i, 6))] . $o;
     }
     # Some few bits remaining ?
     if ($i < 0 && $i > -6) {
-        $o = $m{bindec(substr($b, 0, $i + 6))} . $o;
+        $o = $m[bindec(substr($b, 0, $i + 6))] . $o;
     }
     return $o;
 }
-- 
2.34.1