|
|
@@ -122,7 +122,9 @@ class StreamHandler extends AbstractProcessingHandler
|
|
|
}
|
|
|
$this->createDir($url);
|
|
|
$this->errorMessage = null;
|
|
|
- set_error_handler([$this, 'customErrorHandler']);
|
|
|
+ set_error_handler(function (...$args) {
|
|
|
+ return $this->customErrorHandler(...$args);
|
|
|
+ });
|
|
|
try {
|
|
|
$stream = fopen($url, 'a');
|
|
|
if ($this->filePermission !== null) {
|
|
|
@@ -193,7 +195,9 @@ class StreamHandler extends AbstractProcessingHandler
|
|
|
$dir = $this->getDirFromStream($url);
|
|
|
if (null !== $dir && !is_dir($dir)) {
|
|
|
$this->errorMessage = null;
|
|
|
- set_error_handler([$this, 'customErrorHandler']);
|
|
|
+ set_error_handler(function (...$args) {
|
|
|
+ return $this->customErrorHandler(...$args);
|
|
|
+ });
|
|
|
$status = mkdir($dir, 0777, true);
|
|
|
restore_error_handler();
|
|
|
if (false === $status && !is_dir($dir) && strpos((string) $this->errorMessage, 'File exists') === false) {
|