summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2013-07-29 08:56:35 +0200
committerAndrey Andreev <narf@devilix.net>2013-07-29 08:56:35 +0200
commit277533099194f55fba2c06477ccf57024c73dd61 (patch)
treec9eea545a4f97b335ea78f070e1b087f38c3c2ce /system
parent42113449a6942236236bab80328e6dc541a32585 (diff)
parented670246fa70d0156b561c56291b8bd58aa9df34 (diff)
Merge pull request #2567 from vlakoff/develop-2
Polishing Form helper
Diffstat (limited to 'system')
-rw-r--r--system/helpers/form_helper.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php
index 6fca73f85..146c0f588 100644
--- a/system/helpers/form_helper.php
+++ b/system/helpers/form_helper.php
@@ -931,9 +931,9 @@ if ( ! function_exists('_attributes_to_string'))
*/
function _attributes_to_string($attributes)
{
- if (is_string($attributes))
+ if (empty($attributes))
{
- return ($attributes === '' ? '' : ' '.$attributes);
+ return '';
}
if (is_object($attributes))
@@ -953,6 +953,11 @@ if ( ! function_exists('_attributes_to_string'))
return $atts;
}
+ if (is_string($attributes))
+ {
+ return ' '.$attributes;
+ }
+
return FALSE;
}
}