Fix deprecations: curly string access

Fix use of access to string acces using curly brackets
https://www.php.net/manual/en/migration74.deprecated.php
This commit is contained in:
MDW
2023-12-14 18:13:40 +01:00
parent cff207ca26
commit a7d1a13de1
2 changed files with 2 additions and 2 deletions

View File

@@ -17,7 +17,7 @@ class MarkdownParser extends CMarkdownParser
{
if ($matches[3] == '-' && preg_match('{^- }', $matches[1]))
return $matches[0];
$level = $matches[3]{0} == '=' ? 1 : 2;
$level = $matches[3][0] == '=' ? 1 : 2;
$text = $this->runSpanGamut($matches[1]);
$attr = $this->doHeaderId($text);
$block = "<h$level$attr>".$text."</h$level>";

View File

@@ -24,7 +24,7 @@ class MarkdownParser extends CMarkdownParser
{
if ($matches[3] == '-' && preg_match('{^- }', $matches[1]))
return $matches[0];
$level = $matches[3]{0} == '=' ? 1 : 2;
$level = $matches[3][0] == '=' ? 1 : 2;
$text = $this->runSpanGamut($matches[1]);
$attr = $this->doHeaderId($text);
$block = "<h$level$attr>".$text."</h$level>";