From 904a28b41dab825eea4d1a9258aec2ea99b9a9d6 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 25 May 2017 11:51:07 +0300 Subject: Merge pull request #5130 from aroche/patch-2 Allow arbitrary strings as extra attributes in form_label --- system/helpers/form_helper.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index a49eea803..75c6e5d47 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -610,13 +610,7 @@ if ( ! function_exists('form_label')) $label .= ' for="'.$id.'"'; } - if (is_array($attributes) && count($attributes) > 0) - { - foreach ($attributes as $key => $val) - { - $label .= ' '.$key.'="'.$val.'"'; - } - } + $label .= _attributes_to_string($attributes); return $label.'>'.$label_text.''; } -- cgit v1.2.3-24-g4f1b