Skip to content

Commit

Permalink
[3.10] [PHP 8.1] Fix Editor Passing null to $string line 258 (#36777)
Browse files Browse the repository at this point in the history
* [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 <[email protected]>

Co-authored-by: Tobias Zulauf <[email protected]>
  • Loading branch information
beat and zero-24 authored Jan 23, 2022
1 parent e5e1329 commit b90fb91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/src/Editor/Editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b90fb91

Please sign in to comment.