MainLogger: initialize shutdown field in the conventional manner

this avoids uninitialized uses
This commit is contained in:
Dylan K. Taylor 2019-10-22 10:21:17 +01:00
parent acaa0e33b0
commit 305c63ba4d

View File

@ -61,7 +61,7 @@ class MainLogger extends \AttachableThreadedLogger{
/** @var \Threaded */ /** @var \Threaded */
protected $logStream; protected $logStream;
/** @var bool */ /** @var bool */
protected $shutdown; protected $shutdown = false;
/** @var bool */ /** @var bool */
protected $logDebug; protected $logDebug;
/** @var MainLogger */ /** @var MainLogger */
@ -344,7 +344,6 @@ class MainLogger extends \AttachableThreadedLogger{
} }
public function run(){ public function run(){
$this->shutdown = false;
$logResource = fopen($this->logFile, "ab"); $logResource = fopen($this->logFile, "ab");
if(!is_resource($logResource)){ if(!is_resource($logResource)){
throw new \RuntimeException("Couldn't open log file"); throw new \RuntimeException("Couldn't open log file");