PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar dgrammatiko
dgrammatiko
20 Sep 2025

Pull Request for Issue # .

Summary of Changes

Typecast some variables to string to eliminate the deprecation warnings on PHP 8.5

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /xxxx/www/libraries/src/Document/HtmlDocument.php on line 533

Testing Instructions

Open the login page and check the deprecations (PHP8.5 required and error reporting to max)

Actual result BEFORE applying this Pull Request

Deprecations logged in the output

Expected result AFTER applying this Pull Request

No deprecations

B/C: since I'm not changing the signature of the function (arguments should be declared as strings and array there, maybe in J6) this should have zero impact to 3d pt devs.

Link to documentations

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

@richard67 ping

avatar dgrammatiko dgrammatiko - open - 20 Sep 2025
avatar dgrammatiko dgrammatiko - change - 20 Sep 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 20 Sep 2025
Category Libraries
avatar dgrammatiko dgrammatiko - change - 20 Sep 2025
The description was changed
avatar dgrammatiko dgrammatiko - edited - 20 Sep 2025
avatar dgrammatiko dgrammatiko - change - 20 Sep 2025
Labels Added: PR-5.4-dev
11af32e 20 Sep 2025 avatar dgrammatiko CS
avatar dgrammatiko dgrammatiko - change - 20 Sep 2025
The description was changed
avatar dgrammatiko dgrammatiko - edited - 20 Sep 2025
fb52dad 20 Sep 2025 avatar dgrammatiko .
avatar richard67
richard67 - comment - 20 Sep 2025

I don’t really need to be pinged for every 5.4-dev PR.

avatar richard67
richard67 - comment - 20 Sep 2025

@dgrammatiko System test are failing.

f20e757 20 Sep 2025 avatar dgrammatiko undo
avatar laoneo
laoneo - comment - 21 Sep 2025

Probably we should add PHP 8.5 to the matrix in system tests as well if possible.

avatar dgrammatiko
dgrammatiko - comment - 21 Sep 2025

@laoneo that would be awesome but atm it’s on beta3 maybe with the rc in a month or so. TBH it would be nice to have Joomla not throwing any errors or warnings before 8.5 is officially released (this the prs)

avatar laoneo
laoneo - comment - 21 Sep 2025

We will see if we can do something in the ATT team.

avatar joomdonation joomdonation - test_item - 22 Sep 2025 - Tested successfully
avatar joomdonation
joomdonation - comment - 22 Sep 2025

I have tested this item ✅ successfully on 5d07d05


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46134.

avatar richard67
richard67 - comment - 22 Sep 2025

I am not sure if this change has side effects.

The $name is not only used as array key but also passed as a parameter in the $this->setBuffer call further below here: 1f3d4b0ff411d275d94c1538ef487ef75d4450d772ad2cf712b5796467917f6dR568 .

The code in that method seems to use null values for the particular options if they are not given in the arguments.

With the change here that would be an empty string.

I have no idea what side effects this might have.

avatar joomdonation
joomdonation - comment - 22 Sep 2025

@richard67 The setBuffer method also changes $name to empty string if null https://github.com/joomla/joomla-cms/blob/5.3-dev/libraries/src/Document/HtmlDocument.php#L603, so the change here does not have any effect for setBuffer call

The $name variable is also used in $renderer->render calls, I also checked and don't see any side affect. I also made real test and did not see any error.

avatar richard67 richard67 - alter_testresult - 22 Sep 2025 - joomdonation: Tested successfully
avatar richard67
richard67 - comment - 22 Sep 2025

@joomdonation I see. After having had a deeper look, it seems ok to me.

Add a Comment

Login with GitHub to post a comment