Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Writer/AbstractWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
namespace Zend\Config\Writer;

use Traversable;
use Zend\Config\Config;
use Zend\Config\Exception;
use Zend\Stdlib\ArrayUtils;

Expand Down Expand Up @@ -52,7 +51,14 @@ function ($error, $message = '', $file = '', $line = 0) use ($filename) {
), $error);
}, E_WARNING
);
file_put_contents($filename, $this->toString($config), $flags);

try {
file_put_contents($filename, $this->toString($config), $flags);
} catch( \Exception $e ) {
restore_error_handler();
throw $e;
}

restore_error_handler();
}

Expand Down

0 comments on commit dc5f609

Please sign in to comment.