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?
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?