From: Jan Schneider Date: Thu, 5 Aug 2010 14:12:49 +0000 (+0200) Subject: Enable track_errors. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=ab560a86954fbb6c21f9725f1302cc2cf8eb0eb0;p=horde.git Enable track_errors. --- diff --git a/framework/Http/lib/Horde/Http/Response/Fopen.php b/framework/Http/lib/Horde/Http/Response/Fopen.php index 4d8b4052b..e681069f3 100644 --- a/framework/Http/lib/Horde/Http/Response/Fopen.php +++ b/framework/Http/lib/Horde/Http/Response/Fopen.php @@ -41,9 +41,15 @@ class Horde_Http_Response_Fopen extends Horde_Http_Response_Base */ public function getBody() { + $oldTrackErrors = ini_set('track_errors', 1); $content = @stream_get_contents($this->_stream); + ini_set('track_errors', $oldTrackErrors); if ($content === false) { - throw new Horde_Http_Exception('Problem reading data from ' . $this->uri . ': ' . $php_errormsg); + $msg = 'Problem reading data from ' . $this->uri; + if (isset($php_errormsg)) { + $msg .= ': ' . $php_errormsg; + } + throw new Horde_Http_Exception($msg); } return $content; }