From: Michael J. Rubinsky Date: Tue, 9 Mar 2010 14:22:45 +0000 (-0500) Subject: Don't assume that $data is an object - it might also be a string here. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=e2ccee4480b9961f3e682a6f95db18b9dc37fbaf;p=horde.git Don't assume that $data is an object - it might also be a string here. Really need to either document or standardize the type for $data in this function. It's currently either an array/object/string depending on where it was called from. --- diff --git a/framework/Core/lib/Horde.php b/framework/Core/lib/Horde.php index 74b1ba3e1..f176ddf30 100644 --- a/framework/Core/lib/Horde.php +++ b/framework/Core/lib/Horde.php @@ -670,7 +670,7 @@ HTML; case 'html': case 'plain': case 'xml': - $s_data = $data->response; + $s_data = is_string($data) ? $data : $$data->response; header('Content-Type: text/' . $ct . '; charset=' . $charset); echo $s_data; break;