From: Michael M Slusarz Date: Mon, 26 Oct 2009 18:32:16 +0000 (-0600) Subject: Correctly return a stream even if error is encountered. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=4c0869c6621bfdc78ea2abb674907b5f1b0014d9;p=horde.git Correctly return a stream even if error is encountered. --- diff --git a/imp/lib/Contents.php b/imp/lib/Contents.php index 693ef495d..95d4eeeb3 100644 --- a/imp/lib/Contents.php +++ b/imp/lib/Contents.php @@ -252,7 +252,9 @@ class IMP_Contents return $swrapper->fopen(); } } catch (Horde_Imap_Client_Exception $e) { - return ''; + return empty($options['stream']) + ? '' + : fopen('php://temp', 'r+'); } } @@ -289,7 +291,7 @@ class IMP_Contents } catch (Horde_Imap_Client_Exception $e) { return empty($options['stream']) ? '' - : array(); + : fopen('php://temp', 'r+'); } }