Skip to content

Commit

Permalink
Cleanup based on review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jan 11, 2014
1 parent ea6ace4 commit 3a14f83
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/View/Input/Radio.php
Expand Up @@ -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.
*
Expand All @@ -68,7 +68,6 @@ public function render($data) {
'label' => true,
'empty' => false,
];
$opts = [];
$options = (array)$data['options'];
$escape = $data['escape'];
if (!empty($data['empty'])) {
Expand All @@ -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;
Expand Down

0 comments on commit 3a14f83

Please sign in to comment.