From 06510446d4b4bb79cb38aae61698683795cd4be6 Mon Sep 17 00:00:00 2001 From: Dominique FOURNIER Date: Wed, 8 Feb 2023 14:37:48 +0100 Subject: [PATCH] Xdiff : PHP8.2 Deprecated : trim must not receive a null parameter --- src/Xdiff.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Xdiff.php b/src/Xdiff.php index efc4f03..6825391 100644 --- a/src/Xdiff.php +++ b/src/Xdiff.php @@ -467,7 +467,7 @@ class Xdiff if (! is_string($side2)) { throw new \Exception("XDiff : side2 parameter not a string"); } - if (trim($symbol) === "") { + if ($symbol !== null && trim($symbol) === "") { $symbol = null; } $side1 = mb_substr(rtrim($side1), 0, $this->s2sWidth - 1);