Project

General

Profile

Actions

Bug #99975

closed

TYPO3\CMS\Frontend\Service\TypoLinkCodecService throws error on a-tag without href

Added by Sven Ignor almost 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Start date:
2023-02-17
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.1
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

Description

"a" tags with missing href attributes (such as '<a id="foo">bar</a>' or <a name="foo">bar</a>) lead to:

(1/1) #1476107295 TYPO3\CMS\Core\Error\Exception
PHP Runtime Deprecation Notice: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/public/typo3/sysext/frontend/Classes/Service/TypoLinkCodecService.php line 81

Since $typolink is 'NULL' at this point.


Files

checkTypolinkBeforeTrimming.patch (978 Bytes) checkTypolinkBeforeTrimming.patch patch to check !is_null($typolink) Sven Ignor, 2023-02-17 11:20
Actions

Also available in: Atom PDF