From 113e3df63b875627e071e2ef597269c85cdb8f78 Mon Sep 17 00:00:00 2001 From: robsonsobral Date: Thu, 21 Jul 2011 21:57:23 -0700 Subject: [PATCH] Fix display of optiongroup in settings of P&T Dropdown. Force strings after check for array. --- ee2/third_party/pt_field_pack/pt_fieldtype.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ee2/third_party/pt_field_pack/pt_fieldtype.php b/ee2/third_party/pt_field_pack/pt_fieldtype.php index 3d83537..f8a1735 100644 --- a/ee2/third_party/pt_field_pack/pt_fieldtype.php +++ b/ee2/third_party/pt_field_pack/pt_fieldtype.php @@ -43,9 +43,8 @@ function options_setting($options=array(), $indent = '') { if ($r !== '') $r .= "\n"; - // force strings + // force string $name = (string) $name; - $label = (string) $label; // is this just a blank option? if ($name === '' && $label === '') $name = $label = ' '; @@ -57,7 +56,7 @@ function options_setting($options=array(), $indent = '') { $r .= "\n".$this->options_setting($label, $indent.' '); } - else if ($name !== $label) + else if ($name !== (string) $label) { $r .= ' : '.$label; }