diff options
author | Andrey Andreev <narf@devilix.net> | 2014-03-04 16:48:21 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2014-03-04 16:48:21 +0100 |
commit | 93b4e788796d6da181512702d6431ffd7e199bee (patch) | |
tree | 3e1fafb1722ecd45f94be274d50d78a70e857412 /system/helpers/form_helper.php | |
parent | 8850e37c3b5a8639033371a302f949c758de89fa (diff) |
Fix #2916
Diffstat (limited to 'system/helpers/form_helper.php')
-rw-r--r-- | system/helpers/form_helper.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index 2592890cd..fe6b6ce11 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -85,9 +85,12 @@ if ( ! function_exists('form_open')) $hidden[$CI->security->get_csrf_token_name()] = $CI->security->get_csrf_hash(); } - if (is_array($hidden) && count($hidden) > 0) + if (is_array($hidden)) { - $form .= '<div style="display:none;">'.form_hidden($hidden).'</div>'; + foreach ($hidden as $name => $value) + { + $form .= '<input type="hidden" name="'.$name.'" value="'.form_prep($value).'" style="display:none;" />'."\n"; + } } return $form; |