Don't assume that $data is an object - it might also be a string here.
authorMichael J. Rubinsky <mrubinsk@horde.org>
Tue, 9 Mar 2010 14:22:45 +0000 (09:22 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Tue, 9 Mar 2010 14:22:45 +0000 (09:22 -0500)
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.

framework/Core/lib/Horde.php

index 74b1ba3..f176ddf 100644 (file)
@@ -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;