From e4a98430216b14218418fb16b6e15b6bfad929b6 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Thu, 23 Apr 2015 12:38:29 +0200 Subject: [PATCH] Show Icinga 2 boolean variables in the host and service detail views resolves #8747 --- .../monitoring/application/views/helpers/Customvar.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/application/views/helpers/Customvar.php b/modules/monitoring/application/views/helpers/Customvar.php index 87bde6b77..bb9f70a7e 100644 --- a/modules/monitoring/application/views/helpers/Customvar.php +++ b/modules/monitoring/application/views/helpers/Customvar.php @@ -15,8 +15,12 @@ class Zend_View_Helper_Customvar extends Zend_View_Helper_Abstract public function customvar($struct) { - if (is_string($struct) || is_int($struct) || is_float($struct)) { - return $this->view->escape((string) $struct); + if (is_scalar($struct)) { + return $this->view->escape( + is_string($struct) + ? $struct + : var_export($struct, true) + ); } elseif (is_array($struct)) { return $this->renderArray($struct); } elseif (is_object($struct)) {