Skip to content
Snippets Groups Projects
Unverified Commit d851f5ab authored by Tim van Dijen's avatar Tim van Dijen Committed by GitHub
Browse files

Simplify property-type

parent fbc55904
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment