Skip to content

Commit

Permalink
use empty check for path log config
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Mar 20, 2020
1 parent a85fa14 commit f526510
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions system/Log/Handlers/FileHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ public function __construct(array $config = [])
{
parent::__construct($config);

$config['path'] = $config['path'] ?? WRITEPATH . 'logs/';
$this->path = $config['path'] ?: WRITEPATH . 'logs/';
$this->path = empty($config['path']) ? WRITEPATH . 'logs/' : $config['path'];

$this->fileExtension = empty($config['fileExtension']) ? 'log' : $config['fileExtension'];
$this->fileExtension = ltrim($this->fileExtension, '.');
Expand Down

0 comments on commit f526510

Please sign in to comment.