From fabc6c9a6661df2b5b8a852bda0b41a493c8e7f6 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Tue, 21 Aug 2012 11:13:05 -0500 Subject: [PATCH] [zendframework/zf2#2210] Pass ErrorHandler::stop() result as previous exception - Per @mark-mabe - Any place where an exception is throw immediately following an ErrorHandler::stop() call should pass the result of that call as the previous exception. --- src/Translator/Loader/Gettext.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Translator/Loader/Gettext.php b/src/Translator/Loader/Gettext.php index 2d73a917..61b0f05a 100644 --- a/src/Translator/Loader/Gettext.php +++ b/src/Translator/Loader/Gettext.php @@ -60,12 +60,12 @@ public function load($filename, $locale) ErrorHandler::start(); $this->file = fopen($filename, 'rb'); - ErrorHandler::stop(); + $error = ErrorHandler::stop(); if (false === $this->file) { throw new Exception\InvalidArgumentException(sprintf( 'Could not open file %s for reading', $filename - )); + ), 0, $error); } // Verify magic number