Xdiff : PHP8.2 Deprecated : trim must not receive a null parameter

This commit is contained in:
2023-02-08 14:37:48 +01:00
parent 47298fc5e5
commit 06510446d4

View File

@@ -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);