Install J4.3 RC1.
In the backend I have 2 Deprecated messages when navigating around the backend of my site opening various Components.
Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in C:\xampp\htdocs\sites\Joomla_4.3.x\libraries\src\HTML\Helpers\SearchTools.php on line 113
I fixed this first one by adding the null coalescing operator
$direction = strtolower($direction ?? ' ');
Deprecated: Automatic conversion of false to array is deprecated in C:\xampp\htdocs\sites\Joomla_4.3.x\libraries\src\HTML\HTMLHelper.php on line 790
System Info
Joomla 4.3 RC1
PHP 8.1.12
MariaDB
Labels |
Added:
No Code Attached Yet
|
Labels |
Added:
Information Required
|
Hi Quy,
This is not a clean install of the RC but it was a clean install of Beta 4. While testing Beta 4 I did install a few 3rd party extensions.
Yootheme Template, Zoo, Widgetkit and DPCalendar the error messages only appear if I am navigating around the backend and not if I am using a joomla component.
As a test to see how J4 would be on php 8.1, I swictch from 8.0.28 to 8.1 and the deprecated notices appear.
Sorry with error reporting on max I don't see much else to point to.
Let me know if I can do something else to test where the error is coming from to help pin point it.
Labels |
Added:
PHP 8.x
|
@Stevec4 It's very likely these deprecated messages come from third party extension. You can try to file modify the code in libraries\src\HTML\Helpers\SearchTools.php at line 113 to below code:
if ($direction === null) {
debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
die();
}
That should display the traces and you can see what extension causing this issue and report it to developer of that extension
For the Automatic conversion of false to array is deprecated, surely it causes by a third party extension calling HTMLHelper
script
method with wrong arguments passed (that was deprecated from Joomla 3.7.0 if I remember correctly), so not something from the core.
Thank you Tuan, I will add that code snippet today and see what it points too.
Steve
I was able to trace down a null being passed to the search tools fixed it and reported it.
Though I have not had much luck with the second one Automatic conversion of false to array is deprecated
When I look at my php logs is shows the following file as the referrer
PHP Deprecated: Automatic conversion of false to array is deprecated in ```
C:\xamp\htdocs\sites\Joomla_4.3.x\libraries\src\HTML\HTMLHelper.php on line 790, referer: http://localhost/sites/Joomla_4.3.x/administrator/index.php?option
=com_cpanel&view=cpanel&dashboard=system
@Stevec4 You can use the same approach to find the extension causing the Automatic conversion of false to array is deprecated warning. Just add the below line of code below to the line 790 of the file :
if (!is_array($options)) {
debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
die();
}
@joomdonation
Perfect that did the trick, it was a 3rd party app trying to load a modal script.
So far no other deprecated msgs.
Thanks Tuan for the assistance tracking it down.
OK Steve. Happy it helped. I'm closing this issue because it is none core issue.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-03-26 11:04:56 |
Closed_By | ⇒ | joomdonation |
Is this a clean installation with no 3rd party extensions? Please provide steps to reproduce as I am not getting these notices.