Package: php-markdown Version: 1.8.0-1 Severity: important X-Debbugs-Cc: justineuro....@gmail.com
Dear Maintainer, * What led up to the situation? I installed `php-markdown` as part of the procedures in the `README.markdown` from `https://github.com/skurfer/RenderMarkdown.git` for installing the script that converts Markdown files to HTML * What exactly did you do (or not do) that was effective (or ineffective)? Installed `php-markdown` but this was initially ineffective in rendering the script functional. The Apache 2 `error.log` file shows errors similar to the following: [Tue Jul 23 10:31:59.279853 2024] [php:error] [pid 609550:tid 609550] [client 127.0.0.1:60104] 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 I edited the curly braces ("{ }") to square brackets ("[ ]") in /usr/share/php/Michelf/Markdown.php in the affected lines as given in the Apache 2 error.log: lines 955, 1361, 1386, 1799, 1801. * What was the outcome of this action? Editing the `Markdown.php` file as described above apparently rendered the script effective. Maybe the same edits are also necessary to the `MarkdownExtra.php` file that appears in the same directory as `Markdown.php`. Thanks for your kind attention. Best, Justine Leon Uro email: justineuro....@gamil.com -- System Information: Debian Release: 12.6 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 6.1.0-23-amd64 (SMP w/4 CPU threads; PREEMPT) Kernel taint flags: TAINT_WARN Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages php-markdown depends on: ii php-common 2:93 php-markdown recommends no packages. php-markdown suggests no packages. -- no debconf information
[Tue Jul 23 10:31:59.279853 2024] [php:error] [pid 609550:tid 609550] [client 127.0.0.1:60104] 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 $ diff /usr/share/php/Michelf/Markdown.php /usr/share/php/Michelf/Markdown.php.ORI 955c955 < $level = $matches[2][0] == '=' ? 1 : 2; --- > $level = $matches[2]{0} == '=' ? 1 : 2; 1361c1361 < $token_stack[0] = str_repeat($token[0], 3-$token_len); --- > $token_stack[0] = str_repeat($token{0}, > 3-$token_len); 1386c1386 < $em = $token[0]; --- > $em = $token{0}; 1799c1799 < switch ($token[0]) { --- > switch ($token{0}) { 1801c1801 < return $this->hashPart("&#". ord($token[1]). ";"); --- > return $this->hashPart("&#". ord($token{1}). > ";"); $ diff /usr/share/php/Michelf/MarkdownExtra.php /usr/share/php/Michelf/MarkdownExtra.php.ORI 215c215 < if ($element[0] == '.') { --- > if ($element{0} == '.') { 217c217 < } else if ($element[0] == '#') { --- > } else if ($element{0} == '#') { 511c511 < else if ($tag[0] == "\n" || $tag[0] == " ") { --- > else if ($tag{0} == "\n" || $tag{0} == " ") { 518c518 < else if ($tag[0] == "`") { --- > else if ($tag{0} == "`") { 552c552 < $tag[1] == '!' || $tag[1] == '?') --- > $tag{1} == '!' || $tag{1} == '?') 567c567 < if ($tag[1] == '/') $depth--; --- > if ($tag{1} == '/') > $depth--; 667c667 < return array($original_text[0], substr($original_text, 1)); --- > return array($original_text{0}, > substr($original_text, 1)); 677c677 < $tag[1] == '!' || $tag[1] == '?') --- > $tag{1} == '!' || $tag{1} == '?') 686c686 < if ($tag[1] == '/') $depth--; --- > if ($tag{1} == '/') > $depth--; 1074c1074 < $level = $matches[3][0] == '=' ? 1 : 2; --- > $level = $matches[3]{0} == '=' ? 1 : 2; 1469c1469 < if ($classname[0] == '.') --- > if ($classname{0} == '.')