You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dynamic properties are no longer supported in PHP 8.2, and line 46 in /plugins/phile/parserMarkdown/Classes/Parser/Markdown.php causes an ErrorException.
Wrapping line 46 with a property check prevents the error, though perhaps masking a more foundational issue (see below).
if (property_exists($parser, $key)) {
$parser->{$key} = $value;
}
Potential root issue
The configuration appears to be setting a property within the MarkdownExtra class that does not exist, an uncaught issue before PHP 8.2 since dynamically creating properties was previously allowed. Comparing var_dump($this->config); against https://michelf.ca/projects/php-markdown/configuration/ confirms all but "active" are valid properties.
That last "active" property doesn't show up in /plugins/phile/parserMarkdown/config.php so I'm guessing it's from line 104 in /config/defaults.php where the plugin is enabled...shouldn't that be exclusively internal to the Phile plugin, not passed on to the MarkdownExtra class? And if that's the case, how would it be properly corrected? I'm guessing my quick fix above is probably not the right way to do it?
The text was updated successfully, but these errors were encountered:
iaian7
added a commit
to iaian7/Phile
that referenced
this issue
Dec 28, 2022
Issue
Dynamic properties are no longer supported in PHP 8.2, and line 46 in
/plugins/phile/parserMarkdown/Classes/Parser/Markdown.php
causes an ErrorException.Tested using the latest build in issue #347:
Quick Fix
Wrapping line 46 with a property check prevents the error, though perhaps masking a more foundational issue (see below).
Potential root issue
The configuration appears to be setting a property within the MarkdownExtra class that does not exist, an uncaught issue before PHP 8.2 since dynamically creating properties was previously allowed. Comparing
var_dump($this->config);
against https://michelf.ca/projects/php-markdown/configuration/ confirms all but "active" are valid properties.That last "active" property doesn't show up in
/plugins/phile/parserMarkdown/config.php
so I'm guessing it's from line 104 in/config/defaults.php
where the plugin is enabled...shouldn't that be exclusively internal to the Phile plugin, not passed on to the MarkdownExtra class? And if that's the case, how would it be properly corrected? I'm guessing my quick fix above is probably not the right way to do it?The text was updated successfully, but these errors were encountered: