Set error reporting to maximum
Create a category blog menu item
Set PHP to 8.2 or higher
Open the blog layout page on the frontend
No deprecation warning
You'll get the error: Deprecated: mb_strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in C:\wamp64\www\roc\public_html\libraries\vendor\joomla\string\src\phputf8\mbstring\core.php on line 44
This is probably caused by the email cloak plugin. When this plugin is disabled, the error is gone.
J5.0.3 / Apache / PHP 8.2
Labels |
Removed:
?
|
Labels |
Added:
No Code Attached Yet
|
Labels |
Added:
Information Required
|
@richard67 Here is the call stack
The debug system of Joomla gives no feedback.
Labels |
Removed:
Information Required
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-02-23 17:52:31 |
Closed_By | ⇒ | alikon |
EDIT: Sorry, I missed this PR ( #42865 ) , which solves it:
This problem still can occur (version Joomla 5.0.3) in case, e.g. some 3pd extension uses:
HTMLHelper::_('content.prepare', $description);
and the description is null (replace the description variable with anything), then this null is chained to cloak method and StringHelper::strpos method which then produces this error in vendor/joomla/string/src/phputf8/mbstring/core.php:45
I didn't test if there can be some place which can hypothetically use null in HTMLHelper::_('content.prepare', ...); in core, but there is a lot of places in core:
Either by adding (string) or a condition preventing method calls with null.
So, even if this problem is hypothetical in e.g. core, it may not apply to the extensions using HTMLHelper and its correction in 42865 is needed.
Thank you @alikon
having the same issue! when i disable the plugin "Content - Email Cloaking" the error is fixed. do we need that plugin "Content - Email Cloaking" ?? what is it for? it will get resolved in the next joomla uopdate?
plus you should never run a live site with error reporting on
plus you should never run a live site with error reporting on
that site, with error reporting on, is the demo site for the checks before we update the live one!
@RickR2H Do you get a call stack shown when switching on "Debug System" in Global Configuration? If yes, post a screenshot or text copy here. Thanks in advance.