From a785a4f2d1c8137ac82062d5b52cf7b6f575a72f Mon Sep 17 00:00:00 2001 From: aroche Date: Wed, 24 May 2017 15:30:05 +0200 Subject: fix bad attribute handling of form_label When passing a string for extra attributes in form_label helper function, these attributes were skipped. --- system/helpers/form_helper.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'system/helpers/form_helper.php') diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index 4a4a7c89f..6f7e63b32 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -609,13 +609,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