Project

General

Profile

Actions

Bug #99884

closed

GeneralUtility::cmpIP -> trim() issue with PHP 8.1

Added by Henrik Elsner about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2023-02-08
Due date:
% Done:

0%

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

Description

I get an FATAL error with PHP 8.1 on the mentioned line (218)
The error message is not formatted or anything.

using `$list = trim($list ?? '');` already solved the issue. (will provide patch later)

I don't know if that's the fitting patch though.
Also i see an trim() call without the null check in line 267 as well

Actions #1

Updated by Henrik Elsner about 1 year ago

  • Status changed from New to Closed

Update:
I got the issue.

The complete stacktrace hinted me to GeneralUtility line 2551:

static::cmpIP($_SERVER['REMOTE_ADDR'], $GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyIP'])

I checked for the config and noticed we used an env var to set the value, which was not existing though.

I see this as wrong config, so i won't patch, thus catch this issue.

Actions

Also available in: Atom PDF