From 3a14f83a1c3753f01d6d0dbb6140df8eda6371fa Mon Sep 17 00:00:00 2001 From: mark_story Date: Fri, 10 Jan 2014 21:34:24 -0500 Subject: [PATCH] Cleanup based on review comments. --- src/View/Input/Radio.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/View/Input/Radio.php b/src/View/Input/Radio.php index 1495251fd8f..946c9f05488 100644 --- a/src/View/Input/Radio.php +++ b/src/View/Input/Radio.php @@ -51,7 +51,7 @@ public function __construct($templates) { * - `options` - An array of options. See below for more information. * - `disabled` - Either true or an array of inputs to disable. * When true, the select element will be disabled. - * - `value` - A string of the option to mark as selected. + * - `value` - A string of the option to mark as selected. * - `label` - Either false to disable label generation, or * an array of attributes for all labels. * @@ -68,7 +68,6 @@ public function render($data) { 'label' => true, 'empty' => false, ]; - $opts = []; $options = (array)$data['options']; $escape = $data['escape']; if (!empty($data['empty'])) { @@ -77,6 +76,7 @@ public function render($data) { } unset($data['empty']); + $opts = []; foreach ($options as $val => $text) { if (is_int($val) && isset($text['text'], $text['value'])) { $radio = $text;