From d851f5abafbff09b74203ef545d750b591e8fd2c Mon Sep 17 00:00:00 2001 From: Tim van Dijen <tim.dijen@minbzk.nl> Date: Wed, 18 Sep 2019 15:14:53 +0200 Subject: [PATCH] Simplify property-type --- modules/core/lib/Stats/Output/File.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/core/lib/Stats/Output/File.php b/modules/core/lib/Stats/Output/File.php index dd967da7e..54530065c 100644 --- a/modules/core/lib/Stats/Output/File.php +++ b/modules/core/lib/Stats/Output/File.php @@ -20,7 +20,7 @@ class File extends \SimpleSAML\Stats\Output /** * The file handle for the current file. - * @var resource|null|false + * @var resource|null */ private $file = null; @@ -65,10 +65,11 @@ class File extends \SimpleSAML\Stats\Output } $fileName = $this->logDir.'/'.$date.'.log'; - $this->file = @fopen($fileName, 'a'); - if ($this->file === false) { + $fh = @fopen($fileName, 'a'); + if ($fh === false) { throw new Error\Exception('Error opening log file: '.var_export($fileName, true)); } + $this->file = $fh; // Disable output buffering stream_set_write_buffer($this->file, 0); -- GitLab