From b90fb91e446e85ada17914315e2915621532d08e Mon Sep 17 00:00:00 2001 From: beat Date: Sun, 23 Jan 2022 19:28:44 +0100 Subject: [PATCH] [3.10] [PHP 8.1] Fix Editor Passing null to $string line 258 (#36777) * [3.10] [PHP 8.1] Fix Editor Passing null to $string line 258 Fixes `Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in libraries/src/Editor/Editor.php on line 258` * [PHP 8.1] Editor in backend: Better fix for #36777 Co-authored-by: Tobias Zulauf Co-authored-by: Tobias Zulauf --- libraries/src/Editor/Editor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/src/Editor/Editor.php b/libraries/src/Editor/Editor.php index b5a0834a044d1..cabe4d34a610d 100644 --- a/libraries/src/Editor/Editor.php +++ b/libraries/src/Editor/Editor.php @@ -255,7 +255,7 @@ public function initialise() foreach ($results as $result) { - if (trim($result)) + if (!is_null($result) && trim($result)) { // @todo remove code: $return .= $result; $return = $result;