From bdeca100d5e146360849234b14edbfc81e2488b5 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 21 Dec 2019 22:10:11 +0100 Subject: [PATCH] fix phpcs --- DataStorage/Session/ConsoleSessionHandler.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/DataStorage/Session/ConsoleSessionHandler.php b/DataStorage/Session/ConsoleSessionHandler.php index 793f36f73..e1fb83e5d 100644 --- a/DataStorage/Session/ConsoleSessionHandler.php +++ b/DataStorage/Session/ConsoleSessionHandler.php @@ -101,7 +101,11 @@ final class ConsoleSessionHandler implements \SessionHandlerInterface, \SessionI */ public function read($id) { - return (string) @\file_get_contents($this->savePath . '/sess_' . $id); + if (!\file_exists($this->savePath . '/sess_' . $id)) { + return ''; + } + + return (string) \file_get_contents($this->savePath . '/sess_' . $id); } /**