Issue started after update to Joomla 4.2.6 and is due to change #38977
call HTMLHelper::_('content.prepare', null, '', 'test');
above test is only to show the error, a component is able to push null to the function, e.g. when the value comes from parameters and the parameter is not set it will return null.
Deprecated: strpos(): Passing null to parameter # 1 ($haystack) of type string is deprecated in [root]/plugins/content/loadmodule/loadmodule.php on line 58
when doing a dump of $article in the plugin it shows $article->text = null
no warning
Deprecated: strpos(): Passing null to parameter # 1 ($haystack) of type string is deprecated in [root]/plugins/content/loadmodule/loadmodule.php on line 58
Joomla 4.2.6
PHP 8.1
this can be fixed by also checking on !is_null($article->text).
if (!is_object($article) || !property_exists($article, 'text') || is_null($article->text)) {
Labels |
Removed:
?
|
Labels |
Added:
No Code Attached Yet
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-12-29 18:15:57 |
Closed_By | ⇒ | richard67 |
Closing as having a pull request. Please test #39522 . Thanks in advance.