summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-03-04 16:48:21 +0100
committerAndrey Andreev <narf@devilix.net>2014-03-04 16:48:21 +0100
commit93b4e788796d6da181512702d6431ffd7e199bee (patch)
tree3e1fafb1722ecd45f94be274d50d78a70e857412
parent8850e37c3b5a8639033371a302f949c758de89fa (diff)
Fix #2916
-rw-r--r--system/helpers/form_helper.php7
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;