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';