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

Commit

Permalink
Merge commit 'refs/pull/3441/head' of github.com:zendframework/zf2 in…
Browse files Browse the repository at this point in the history
…to hotfix/restore-error-handler
  • Loading branch information
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 79b7000

Please sign in to comment.