Your message dated Tue, 1 Mar 2022 21:49:05 +0000 (UTC)
with message-id <pine.bsm.4.64l.2203012148430.22...@herc.mirbsd.org>
and subject line php-markdown was removed from unstable and testing
has caused the Debian Bug report #1004532,
regarding php-markdown: PHP message: PHP Fatal error:  Array and string offset 
access syntax with curly braces
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
1004532: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1004532
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: php-markdown
Version: 1.8.0-1.1
Severity: grave
Tags: patch
Justification: renders package unusable

        After the upgrade to PHP 8.1, this package has stopped working
completely with errors like:
---
PHP message: PHP Fatal error:  Array and string offset access syntax with curly 
braces is no longer supported in /usr/share/php/Michelf/Markdown.php on line 955
PHP message: PHP Fatal error:  Array and string offset access syntax with curly 
braces is no longer supported in /usr/share/php/Michelf/Markdown.php on line 
1361
PHP message: PHP Fatal error:  Array and string offset access syntax with curly 
braces is no longer supported in /usr/share/php/Michelf/Markdown.php on line 
1386
PHP message: PHP Fatal error:  Array and string offset access syntax with curly 
braces is no longer supported in /usr/share/php/Michelf/Markdown.php on line 
1799
PHP message: PHP Fatal error:  Array and string offset access syntax with curly 
braces is no longer supported in /usr/share/php/Michelf/Markdown.php on line 
1801
---

I think this patch should fix things up:

--- /usr/share/php/Michelf/Markdown.php.old     2018-01-14 16:49:33.000000000 
-0800
+++ /usr/share/php/Michelf/Markdown.php 2022-01-29 13:27:18.022519179 -0800
@@ -952,7 +952,7 @@
                        return $matches[0];
                }
 
-               $level = $matches[2]{0} == '=' ? 1 : 2;
+               $level = $matches[2][0] == '=' ? 1 : 2;
 
                // ID attribute generation
                $idAtt = $this->_generateIdFromHeaderValue($matches[1]);
@@ -1358,7 +1358,7 @@
                                } else {
                                        // Other closing marker: close one em 
or strong and
                                        // change current token state to match 
the other
-                                       $token_stack[0] = str_repeat($token{0}, 
3-$token_len);
+                                       $token_stack[0] = str_repeat($token[0], 
3-$token_len);
                                        $tag = $token_len == 2 ? "strong" : 
"em";
                                        $span = $text_stack[0];
                                        $span = $this->runSpanGamut($span);
@@ -1383,7 +1383,7 @@
                                } else {
                                        // Reached opening three-char emphasis 
marker. Push on token
                                        // stack; will be handled by the 
special condition above.
-                                       $em = $token{0};
+                                       $em = $token[0];
                                        $strong = "$em$em";
                                        array_unshift($token_stack, $token);
                                        array_unshift($text_stack, '');
@@ -1796,9 +1796,9 @@
         * @return string
         */
        protected function handleSpanToken($token, &$str) {
-               switch ($token{0}) {
+               switch ($token[0]) {
                        case "\\":
-                               return $this->hashPart("&#". ord($token{1}). 
";");
+                               return $this->hashPart("&#". ord($token[1]). 
";");
                        case "`":
                                // Search for end marker in remaining text.
                                if 
(preg_match('/^(.*?[^`])'.preg_quote($token).'(?!`)(.*)$/sm',

-- System Information:
Debian Release: bookworm/sid
  APT prefers testing
  APT policy: (650, 'testing'), (600, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.15.0-3-amd64 (SMP w/4 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages php-markdown depends on:
ii  php-common  2:92

php-markdown recommends no packages.

php-markdown suggests no packages.

-- no debconf information

--- End Message ---
--- Begin Message ---
php-markdown was removed from unstable and testing,
so this can be closed.

bye,
//mirabilos
-- 
Thorsten Glaser (Founding Member)
Teckids e.V. — Digital freedom with youth and education
https://www.teckids.org/

--- End Message ---

Reply via email to