? PHP 8.x ? Maintainers Checked Pending

User tests: Successful: Unsuccessful:

avatar richard67
richard67
24 Nov 2022

Pull Request for Issue #39298 .

Summary of Changes

Add is_string check before calling strpos for the intro text which might be null when no Read More button.

Testing Instructions

On PHP 8.1 with error reporting set to maximum in Global Configuration and PHP configured to log errors into a log file, edit an article in backend which has no Read More button and so has no intro text. Save the article. Then check the PHP error log file.

Actual result BEFORE applying this Pull Request

PHP notice PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /path-to-your-joomla-site/plugins/content/fields/fields.php on line 66.

Expected result AFTER applying this Pull Request

No such notice.

Link to documentations

Please select:

  • No documentation changes for docs.joomla.org needed

  • No documentation changes for manual.joomla.org needed

avatar richard67 richard67 - open - 24 Nov 2022
avatar richard67 richard67 - change - 24 Nov 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 24 Nov 2022
Category Front End Plugins
avatar toivo toivo - test_item - 25 Nov 2022 - Tested successfully
avatar toivo
toivo - comment - 25 Nov 2022

I have tested this item successfully on 4f91d90

Tested successfully in Joomla 4.2.6-dev using PHP 8.1.10.


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

avatar alikon alikon - test_item - 26 Nov 2022 - Tested successfully
avatar alikon
alikon - comment - 26 Nov 2022

I have tested this item successfully on 4f91d90


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

avatar richard67 richard67 - change - 26 Nov 2022
Status Pending Ready to Commit
Labels Added: ? PHP 8.x Maintainers Checked
avatar richard67
richard67 - comment - 26 Nov 2022

RTC


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

avatar laoneo laoneo - change - 28 Nov 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-11-28 08:56:41
Closed_By laoneo
Labels Added: ?
avatar laoneo laoneo - close - 28 Nov 2022
avatar laoneo laoneo - merge - 28 Nov 2022
avatar laoneo
laoneo - comment - 28 Nov 2022

Thank you!

Add a Comment

Login with GitHub to post a comment