Project

General

Profile

Actions

Bug #102029

closed

Deprecation notice when using CE "Related pages" (menu_related_pages)

Added by Ramón Schlosser about 1 year ago. Updated 5 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2023-09-25
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When using the CE "Related pages" (menu_related_pages) and having pages in the list with no keyword selected the following exception occurs:

PHP Runtime Deprecation Notice: preg_split(): Passing null to parameter #2 ($subject) of type string is deprecated in /var/www/html/vendor/typo3/cms-frontend/Classes/ContentObject/ContentObjectRenderer.php line 4760

The problem seems to be that when creating ne pages the keywords are `NULL`. A simple "Null coalescing operator" in /typo3/cms-frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php:828 should fix the issue:

$kw = trim($this->parent_cObj->keywords($value_rec[$kfieldSrc] ?? ''));

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #96953: Deprecation notice when passing null value to HtmlViewHelperClosed2022-02-17

Actions
Actions

Also available in: Atom PDF