Commit 94682589 authored by Stefan Bürk's avatar Stefan Bürk Committed by Andreas Fernandez
Browse files

[BUGFIX] Avoid calling str_contains(null) in DataHandler

Method convNumEntityToByteValue() has been removed through #95789,
thus the one place it was called was removed also. As this method
called in that place has ensured that "$value" was always a string,
this is not ensured anymore after its removal.

Now this ends up calling str_contains(...) with a non-string
value which throws an E_DEPRECATED warning in PHP 8.1.

This patch adds a *string* type cast to ensure "$value" is always
a string, thus avoid calling str_contains(...) with a null value.

Resolves: #95827
Releases: master
Change-Id: I568ee5cf34342ee2080a54ad8d8810104044b7fd

Reviewed-by: Oliver Klee's avatarOliver Klee <>
Reviewed-by: Nikita Hovratov's avatarNikita Hovratov <>
Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <>
Tested-by: core-ci's avatarcore-ci <>
Tested-by: Nikita Hovratov's avatarNikita Hovratov <>
Tested-by: Andreas Fernandez's avatarAndreas Fernandez <>
parent 854669bd
......@@ -2020,6 +2020,8 @@ class DataHandler implements LoggerAwareInterface
// Detecting if value sent is an array and if so, implode it around a comma:
if (is_array($value)) {
$value = implode(',', $value);
} else {
$value = (string)$value;
// When values are sent as group or select they come as comma-separated values which are exploded by this function:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment