? ? ? Pending

User tests: Successful: Unsuccessful:

avatar beat
beat
21 Jan 2022

Pull Request for Issue # none, found and fixed directly here.

Summary of Changes

Fixes PHP 8.1 incompatibility Deprecated: preg_split(): Passing null to parameter #3 ($limit) of type int is deprecated in libraries/src/Document/HtmlDocument.php on line 595

Actually, null would converts to 0, but it's the same as the function's default value of -1 that was expected there.

See https://www.php.net/manual/en/function.preg-split.php :

limit
If specified, then only substrings up to limit are returned with the rest of the string being placed in the last substring. A limit of -1 or 0 means "no limit".

Testing Instructions

Open administrator backend in debug mode (with all incl. deprecation warnings turned on), and see this warning, then apply patch and see it disappear.

Actual result BEFORE applying this Pull Request

Deprecated: preg_split(): Passing null to parameter #3 ($limit) of type int is deprecated in libraries/src/Document/HtmlDocument.php on line 595

Expected result AFTER applying this Pull Request

warning disappeared.

Documentation Changes Required

none.

avatar beat beat - open - 21 Jan 2022
avatar beat beat - change - 21 Jan 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 21 Jan 2022
Category Libraries
avatar richard67
richard67 - comment - 22 Jan 2022

I have tested this item successfully on 81ca5b3

Code review with respect to PHP documentation.


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

avatar richard67 richard67 - test_item - 22 Jan 2022 - Tested successfully
avatar Fedik
Fedik - comment - 22 Jan 2022

I have tested this item successfully on 81ca5b3


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

avatar Fedik Fedik - test_item - 22 Jan 2022 - Tested successfully
avatar Fedik Fedik - change - 22 Jan 2022
Status Pending Ready to Commit
avatar Fedik
Fedik - comment - 22 Jan 2022

R2C


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

avatar zero-24
zero-24 - comment - 23 Jan 2022

Thanks merging.

avatar zero-24 zero-24 - change - 23 Jan 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-01-23 15:03:02
Closed_By zero-24
Labels Added: ? ? ?
avatar zero-24 zero-24 - close - 23 Jan 2022
avatar zero-24 zero-24 - merge - 23 Jan 2022

Add a Comment

Login with GitHub to post a comment