From 133beafd1746b0f5fa06794fd183289d43defdbe Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Thu, 10 Mar 2011 16:38:32 +0000 Subject: Changed the logic for form_open() in Form helper. If no value is passed it will submit to the current URL. --- system/helpers/form_helper.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'system') diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index 758056b50..8ed520f5d 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -49,7 +49,10 @@ if ( ! function_exists('form_open')) $attributes = 'method="post"'; } - $action = ( strpos($action, '://') === FALSE) ? $CI->config->site_url($action) : $action; + if ($action && strpos($action, '://') === FALSE) + { + $CI->config->site_url($action); + } $form = '