Show Icinga 2 boolean variables in the host and service detail views

resolves #8747
This commit is contained in:
Alexander A. Klimov 2015-04-23 12:38:29 +02:00
parent 6ba6cb7940
commit e4a9843021
1 changed files with 6 additions and 2 deletions

View File

@ -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)) {