diff --git a/Module/InfoManager.php b/Module/InfoManager.php index a548c5c25..33a66d8e4 100644 --- a/Module/InfoManager.php +++ b/Module/InfoManager.php @@ -88,8 +88,8 @@ class InfoManager */ public function load() /* : void */ { - if (!file_exists($this->path)) { - throw new PathException($this->path); + if ($this->path === false || !file_exists($this->path)) { + throw new PathException((string) $this->path); } $this->info = json_decode(file_get_contents($this->path), true); @@ -105,8 +105,8 @@ class InfoManager */ public function update() /* : void */ { - if (!file_exists($this->path)) { - throw new PathException($this->path); + if ($this->path === false || !file_exists($this->path)) { + throw new PathException((string) $this->path); } file_put_contents($this->path, json_encode($this->info, JSON_PRETTY_PRINT));