projects
/
horde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
784ff94
)
Enable track_errors.
author
Jan Schneider
<jan@horde.org>
Thu, 5 Aug 2010 14:12:49 +0000
(16:12 +0200)
committer
Jan Schneider
<jan@horde.org>
Mon, 9 Aug 2010 13:30:52 +0000
(15:30 +0200)
framework/Http/lib/Horde/Http/Response/Fopen.php
patch
|
blob
|
history
diff --git
a/framework/Http/lib/Horde/Http/Response/Fopen.php
b/framework/Http/lib/Horde/Http/Response/Fopen.php
index
4d8b405
..
e681069
100644
(file)
--- 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;
}