diff options
author | Andrey Andreev <narf@devilix.net> | 2017-05-25 10:51:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-25 10:51:07 +0200 |
commit | fdd4b816c8bb8c072e98a586b0b41786dd34d44c (patch) | |
tree | 6ddb0baa1c04d71cad45d0455eb5523dafc04aea /system/helpers | |
parent | 362c0a14a987d6462e4062a5fc34099446f9e14f (diff) | |
parent | a785a4f2d1c8137ac82062d5b52cf7b6f575a72f (diff) |
Merge pull request #5130 from aroche/patch-2
Allow arbitrary strings as extra attributes in form_label
Diffstat (limited to 'system/helpers')
-rw-r--r-- | system/helpers/form_helper.php | 8 |
1 files changed, 1 insertions, 7 deletions
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.'</label>'; } |