? ? Pending

User tests: Successful: Unsuccessful:

avatar beni71
beni71
14 Sep 2022

Pull Request for Issue #38759 .

Summary of Changes

Added null coalescing check to prevent null warning.

Testing Instructions

In the backend:

  1. Navigate to Menu Home dashboard
  2. Click Global configuration, in TAB "Server", set Error Reporting to "Maximum".
  3. Navigate to Menu System
  4. Click Administrator Template Styles, open your active style which should be "Atum - Default".
  5. In TAB "Image Settings", Select a "Brand Large" image, leave Image description empty and check the "No Description" box.
  6. Select a "Brand Small" image, leave Image description empty and check the "No Description" box.
  7. Click SAVE.

grafik

Actual result BEFORE applying this Pull Request

There were two depreaction warnings like:

Deprecated
: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in
\administrator\templates\atum\index.php
on line
56

Deprecated
: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in
\administrator\templates\atum\index.php
on line
59

Additional test case 2:

  1. Try to test the error page by opening an not existing view like http://your-domain/administrator/index.php?view=xy
  2. Test is successful when there is no PHP warning on the error page.

Additional test case 3:

  1. Logout and navigate to backend login page
  2. Test is successful when there is no PHP warning on the login page.

Expected result AFTER applying this Pull Request

There is no PHP 8.1 warning.

Documentation Changes Required

No

avatar beni71 beni71 - open - 14 Sep 2022
avatar beni71 beni71 - change - 14 Sep 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 14 Sep 2022
Category Administration Templates (admin)
avatar beni71 beni71 - change - 14 Sep 2022
The description was changed
avatar beni71 beni71 - edited - 14 Sep 2022
avatar beni71 beni71 - change - 14 Sep 2022
Labels Added: ?
avatar chmst
chmst - comment - 14 Sep 2022

I suggest a default value for the parameter

: 'alt="' . htmlspecialchars($this->params->get('logoBrandLargeAlt', ''), ENT_COMPAT, 'UTF-8') . '"';

avatar beni71 beni71 - change - 14 Sep 2022
Labels Added: ?
avatar chmst
chmst - comment - 14 Sep 2022

I have tested this item successfully on d9a3f52


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

avatar chmst chmst - test_item - 14 Sep 2022 - Tested successfully
avatar beni71 beni71 - change - 14 Sep 2022
Labels Removed: ?
avatar brianteeman
brianteeman - comment - 14 Sep 2022

I was just typing please update the two error files but you did just di that. Thanks

avatar beni71 beni71 - change - 14 Sep 2022
The description was changed
avatar beni71 beni71 - edited - 14 Sep 2022
avatar beni71 beni71 - change - 14 Sep 2022
The description was changed
avatar beni71 beni71 - edited - 14 Sep 2022
avatar beni71
beni71 - comment - 14 Sep 2022

Unfortunately I have found other places in the code which results in such PHP deprecation warnings. I added two new test cases in the PR description section above.

avatar beni71 beni71 - change - 14 Sep 2022
The description was changed
avatar beni71 beni71 - edited - 14 Sep 2022
avatar chmst
chmst - comment - 14 Sep 2022

@beni71 fortunateLy...

avatar alikon
alikon - comment - 15 Sep 2022

I have tested this item successfully on 8cf408c


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

avatar alikon alikon - test_item - 15 Sep 2022 - Tested successfully
avatar viocassel
viocassel - comment - 15 Sep 2022

I have tested this item successfully on 8cf408c


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

avatar viocassel viocassel - test_item - 15 Sep 2022 - Tested successfully
avatar alikon alikon - change - 15 Sep 2022
Status Pending Ready to Commit
avatar alikon
alikon - comment - 15 Sep 2022

RTC


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

avatar laoneo laoneo - close - 15 Sep 2022
avatar laoneo laoneo - merge - 15 Sep 2022
avatar laoneo laoneo - change - 15 Sep 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-09-15 11:09:23
Closed_By laoneo
Labels Added: ?
avatar laoneo
laoneo - comment - 15 Sep 2022

Thanks!!

Add a Comment

Login with GitHub to post a comment