diff --git a/system/Helpers/form_helper.php b/system/Helpers/form_helper.php index 4f21effbc568..66eec099917e 100644 --- a/system/Helpers/form_helper.php +++ b/system/Helpers/form_helper.php @@ -70,7 +70,13 @@ function form_open(string $action = '', $attributes = [], array $hidden = []): s $csrfId = $attributes['csrf_id']; unset($attributes['csrf_id']); } - + + if(is_array($attributes) && array_key_exists('enctype', $attributes)) + { + $enctype = trim($attributes['enctype']); + unset($attributes['enctype']); + } + $attributes = stringify_attributes($attributes); if (stripos($attributes, 'method=') === false) @@ -83,7 +89,7 @@ function form_open(string $action = '', $attributes = [], array $hidden = []): s $attributes .= ' accept-charset="' . strtolower($config->charset) . '"'; } - $form = '