User tests: Successful: 0 Unsuccessful: 0
Tag view incorrectly creates $tag->text as NULL on empty core_body, hence the content plugins can raise deprecation warning in PHP 8.1
Old code:
!empty($itemElement->core_body) ? $itemElement->text = $itemElement->core_body : $itemElement->text = null;
Even core loadmodule plugin doesn't check if $article->text
is not null:
if (strpos($article->text, '{loadposition') === false && strpos($article->text, '{loadmodule') === false) {
We need to use empty string to satisfy most of plugins which are using strpos()
and don't check if $article->text
exists and is actually a string.
Also: updated onContentPrepare
trigger for each tagged item to a new Event, like in com_content article view.
PHP 8.1, error reporting dev
View a tag page with items, tagged items should have empty description
Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in \plugins\content\loadmodule\loadmodule.php on line 53
No warnings.
Status | New | ⇒ | Pending |
Category | ⇒ | com_tags Front End |
Labels |
Added:
?
|
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-01-24 05:30:11 |
Closed_By | ⇒ | Quy |
Fixed per #39640. Closing as the other change should be in a separate PR. Thanks.