summaryrefslogtreecommitdiffstats
path: root/system/helpers/form_helper.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2017-09-25 18:44:51 +0200
committerAndrey Andreev <narf@devilix.net>2017-09-25 18:44:51 +0200
commite76217041ddcae80f11b50b44a7d409b6722ad40 (patch)
tree6f7dd444bfc5b4206a6e07169ad3c05b9b63fa4d /system/helpers/form_helper.php
parent9c07c3697bab0bf43e10daf59068497dd3a0a9fd (diff)
parentcf728703b5852591c160cbd9566a0e508dd5759a (diff)
Merge branch '3.1-stable'
Diffstat (limited to 'system/helpers/form_helper.php')
-rw-r--r--system/helpers/form_helper.php10
1 files changed, 2 insertions, 8 deletions
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php
index a49eea803..13f196318 100644
--- a/system/helpers/form_helper.php
+++ b/system/helpers/form_helper.php
@@ -597,7 +597,7 @@ if ( ! function_exists('form_label'))
*
* @param string The text to appear onscreen
* @param string The id the label applies to
- * @param array Additional attributes
+ * @param mixed Additional attributes
* @return string
*/
function form_label($label_text = '', $id = '', $attributes = array())
@@ -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.'</label>';
}