File: fix-php8.patch

package info (click to toggle)
php-text-figlet 1.0.2-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 164 kB
  • sloc: php: 323; xml: 108; makefile: 4
file content (32 lines) | stat: -rw-r--r-- 1,129 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From: Andrius Merkys <merkys@debian.org>
Date: Sun, 30 Nov 2025 00:29:34 +0100
Subject: Fix incompatibilities with PHP 8.0

Origin: vendor
Forwarded: no
---
 Text_Figlet-1.0.2/Text/Figlet.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Text_Figlet-1.0.2/Text/Figlet.php b/Text_Figlet-1.0.2/Text/Figlet.php
index fd1b091..d0143da 100644
--- a/Text_Figlet-1.0.2/Text/Figlet.php
+++ b/Text_Figlet-1.0.2/Text/Figlet.php
@@ -245,7 +245,7 @@ class Text_Figlet
                     $i = hexdec(substr($i, 2));
                 } else {
                     // If octal
-                    if ($i{0} === '0' && $i !== '0' || substr($i, 0, 2) == '-0') {
+                    if ($i[0] === '0' && $i !== '0' || substr($i, 0, 2) == '-0') {
                         $i = octdec($i);
                     }
                 }
@@ -288,7 +288,7 @@ class Text_Figlet
                 $lt = hexdec(substr($str, $i+2, 4));
                 $i += 5;
             } else {
-                $lt = ord($str{$i});
+                $lt = ord($str[$i]);
             }
 
             $hb = preg_quote($this->hardblank, '/');