? PHP 8.x Pending

User tests: Successful: Unsuccessful:

avatar laoneo
laoneo
25 May 2022

Summary of Changes

On PHP 8.1 a warning is displayed when the image to clean is null. This happens on empty media form fields.

Testing Instructions

  • Open the back end article form
  • Open the source of the HTML page
  • Search for deprecated

Actual result BEFORE applying this Pull Request

A deprecated message is shown for images.

Expected result AFTER applying this Pull Request

No deprecated message.

avatar laoneo laoneo - open - 25 May 2022
avatar laoneo laoneo - change - 25 May 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 25 May 2022
Category Libraries
avatar laoneo laoneo - change - 25 May 2022
Labels Added: PHP 8.x
avatar laoneo laoneo - change - 26 May 2022
Labels Added: ?
avatar alikon
alikon - comment - 26 May 2022

did you mean this ?
image

avatar laoneo
laoneo - comment - 26 May 2022

Nope, there should be a Notice in the source itself around the subform

avatar joomdonation
joomdonation - comment - 27 May 2022

I can see this notice from PHP error logs. It comes from from our media form field. I wonder if we should fix the code which call this method instead? Shouldn't we only call the method if the url is not empty ?

avatar alikon
alikon - comment - 27 May 2022

i've replicated the issue opening System -> Global Configuration cause of offline image

avatar laoneo
laoneo - comment - 30 May 2022

I can see this notice from PHP error logs. It comes from from our media form field. I wonder if we should fix the code which call this method instead? Shouldn't we only call the method if the url is not empty ?

What would be the advantage?

avatar joomdonation
joomdonation - comment - 30 May 2022

What would be the advantage?

Better code, save the system from having to execute unnecessary commands. It is logical that before displaying image, we check that the image is available before running more code to prepare data to display that image.

avatar laoneo
laoneo - comment - 30 May 2022

Then make your own pr with your better code. I prefer to fix it on the source and make a stable library instead of telling everyone "please do the null check" when using this function.

avatar bembelimen
bembelimen - comment - 18 Jun 2022

As this PR fixes it confirmed, I will merge it.

avatar bembelimen bembelimen - change - 18 Jun 2022
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-06-18 10:04:03
Closed_By bembelimen
avatar bembelimen bembelimen - close - 18 Jun 2022
avatar bembelimen bembelimen - merge - 18 Jun 2022
avatar bembelimen
bembelimen - comment - 18 Jun 2022

Thx

Add a Comment

Login with GitHub to post a comment