mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-04 20:27:31 +02:00
Check for directory before throwing 'no existing directory' exception
This commit is contained in:
committed by
Jordi Boggiano
parent
2aa45553d8
commit
c0eeca76fd
@@ -167,7 +167,7 @@ class StreamHandler extends AbstractProcessingHandler
|
||||
set_error_handler(array($this, 'customErrorHandler'));
|
||||
$status = mkdir($dir, 0777, true);
|
||||
restore_error_handler();
|
||||
if (false === $status) {
|
||||
if (false === $status && !is_dir($dir)) {
|
||||
throw new \UnexpectedValueException(sprintf('There is no existing directory at "%s" and its not buildable: '.$this->errorMessage, $dir));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user