From 61b9d77b757726b8fd157c6591b095acfdee2a52 Mon Sep 17 00:00:00 2001 From: Christian Hieke Date: Thu, 24 Nov 2011 09:41:58 +0100 Subject: [PATCH] Ceeram suggested this change https://github.com/cakephp/cakephp/pull/322#issuecomment-2780158 --- lib/Cake/View/Helper/FormHelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/View/Helper/FormHelper.php b/lib/Cake/View/Helper/FormHelper.php index f16b2453396..87941ce5fcd 100644 --- a/lib/Cake/View/Helper/FormHelper.php +++ b/lib/Cake/View/Helper/FormHelper.php @@ -1303,7 +1303,7 @@ public function radio($fieldName, $options = array(), $attributes = array()) { if (isset($value) && $optValue == $value) { $optionsHere['checked'] = 'checked'; } - if (!empty($disabled) && (is_bool($disabled) || in_array($optValue, $disabled))) { + if ($disabled && (!is_array($disabled) || in_array($optValue, $disabled))) { $optionsHere['disabled'] = true; } $tagName = Inflector::camelize(