From 0089b124f2bf9dbc91e6ecc4115882868ec53e43 Mon Sep 17 00:00:00 2001 From: Bastien Picharles Date: Mon, 26 Sep 2022 16:51:18 +0200 Subject: [PATCH] Fix php 8.1 error for trim() function This is a quick fix, but I don't know if it's normal that some $this->files array keys are 'null' --- src/Files/LocalFile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Files/LocalFile.php b/src/Files/LocalFile.php index ca2e74ad39..89f5c212e0 100644 --- a/src/Files/LocalFile.php +++ b/src/Files/LocalFile.php @@ -29,7 +29,7 @@ class LocalFile extends File */ public function __construct($path, Ruleset $ruleset, Config $config) { - $this->path = trim($path); + $this->path = trim((string) $path); if (Common::isReadable($this->path) === false) { parent::__construct($this->path, $ruleset, $config); $error = 'Error opening file; file no longer exists or you do not have access to read the file';