From bd7280305ac4510bc34a41a9cab8de81addddfdf Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Sun, 9 Mar 2014 01:57:25 +0100 Subject: [PATCH] Cast widget render() result when casting to string --- library/Icinga/Web/Widget/AbstractWidget.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/Icinga/Web/Widget/AbstractWidget.php b/library/Icinga/Web/Widget/AbstractWidget.php index 625f1ef2b..8ab446652 100644 --- a/library/Icinga/Web/Widget/AbstractWidget.php +++ b/library/Icinga/Web/Widget/AbstractWidget.php @@ -9,6 +9,7 @@ use Icinga\Exception\ProgrammingError; use Zend_Controller_Action_HelperBroker as ZfActionHelper; use Zend_View_Abstract; use Icinga\Web\Widget\Widget; +use Exception; /** * Web widgets MUST extend this class @@ -126,6 +127,6 @@ abstract class AbstractWidget implements Widget } catch (Exception $e) { return htmlspecialchars($e->getMessage()); } - return $html; + return (string) $html; } }