Skip to content

Commit

Permalink
Fix PHP8.3 fatal error Duplicate declaration of static variable
Browse files Browse the repository at this point in the history
  • Loading branch information
francoisjacquet committed Mar 29, 2024
1 parent cbe58b1 commit ffb28e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Expand Up @@ -7,6 +7,7 @@ Changes in 11.5.1
- Fix Calculate GPA for all Marking Periods when Year not checked in Transcripts.fnc.php
- Fix HTML display Transcript footer when Credits unchecked in Transcripts.fnc.php
- Format Credit Earned, display 0.33 instead of 0.333333333333333 in Transcripts.fnc.php
- Fix PHP8.3 fatal error Duplicate declaration of static variable in classes/Markdownify/Converter.php

Changes in 11.5
---------------
Expand Down
3 changes: 1 addition & 2 deletions classes/Markdownify/Converter.php
Expand Up @@ -510,6 +510,7 @@ protected function flushLinebreaks()
*/
protected function handleTagToText()
{
static $indent;
if (!$this->keepHTML) {
if (!$this->parser->isStartTag && $this->parser->isBlockElement) {
$this->setLineBreaks(2);
Expand Down Expand Up @@ -539,7 +540,6 @@ protected function handleTagToText()
// don't indent inside <pre> tags
if ($this->parser->tagName == 'pre') {
$this->out($this->parser->node);
static $indent;
$indent = $this->indent;
$this->indent = '';
} else {
Expand All @@ -561,7 +561,6 @@ protected function handleTagToText()
} else {
// reset indentation
$this->out($this->parser->node);
static $indent;
$this->indent = $indent;
}

Expand Down

0 comments on commit ffb28e4

Please sign in to comment.