summaryrefslogtreecommitdiffstats
path: root/system/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'system/helpers')
-rw-r--r--system/helpers/form_helper.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php
index 632f94505..42355df42 100644
--- a/system/helpers/form_helper.php
+++ b/system/helpers/form_helper.php
@@ -57,15 +57,15 @@ if ( ! function_exists('form_open'))
$form .= '>';
- if (is_array($hidden) AND count($hidden) > 0)
+ // CSRF
+ if ($CI->config->item('csrf_protection') === TRUE)
{
- $form .= form_hidden($hidden);
+ $hidden[$CI->security->csrf_token_name] = $CI->security->csrf_hash;
}
- // CSRF
- if ($CI->config->item('csrf_protection') === TRUE)
+ if (is_array($hidden) AND count($hidden) > 0)
{
- $form .= form_hidden($CI->security->csrf_token_name, $CI->security->csrf_hash);
+ $form .= sprintf("\n<div class=\"hidden\">%s</div>", form_hidden($hidden));
}
return $form;