User tests: Successful: Unsuccessful:
Pull Request for Issue #41635
Define missing fields ( $changelog, $changelog, $item) in libraries/src/Changelog/Changelog.php class.
PHP 8.2, Joomla 5.0 Beta 1, set "error reporting" to maximum
Load any extension that has an associated changelog file, for example https://extensions.joomla.org/extension/edition/editors/switch-editor-2/
Go to System/Extensions, search for switch editor in extensions list and click on underlined version number to display changelog content.
Error message : SyntaxError: Unexpected token '<', "
"... is not valid JSON
And Error Log shows "PHP Deprecated: Creation of dynamic property" errors
changelog is displayed
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
Category | ⇒ | Libraries |
Status | New | ⇒ | Pending |
Title |
|
Title |
|
May be we could use a try/catch on line 275 as PHP deprecated lines are added in the output buffer, causing JSON error.
Something like :
try{ $this->$key = $val; } catch (\RuntimeException $e){}
But we'll have no more trace of this PHP deprecation.
We just need to define a missing properties in the class.
But for this need to find out how Changelog class supposed to work ?
You do not need try cacth, iit not critical error. Just a warning.
Set error reaporting to none, and all will work untill php 9
so can we close the issue #41635 as we have a pr ?
@conseilgouz , @Fedik
Labels |
Added:
PR-5.0-dev
|
I removed AllowDynamicProperties and defined missing fields.
They are declared as Arrays, but line 249 replaces their contents to a stdClass : see line 247 : $this->currentChangelog->$name = new \stdClass();
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-09-08 09:47:04 |
Closed_By | ⇒ | Fedik |
not happy with this @Fedik can you have a look?