From 33d4b6aac7f33d6cddfa5fb39c5701ecc9cfa80b Mon Sep 17 00:00:00 2001
From: Derek Allard
Date: Sun, 17 Jan 2010 07:23:00 +0000
Subject: adding the ability for form_open_multipart() to accept string
attribute arguments
---
system/helpers/form_helper.php | 10 +++++++++-
user_guide/changelog.html | 1 +
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php
index c78b805e5..60d2631e9 100644
--- a/system/helpers/form_helper.php
+++ b/system/helpers/form_helper.php
@@ -84,7 +84,15 @@ if ( ! function_exists('form_open_multipart'))
{
function form_open_multipart($action, $attributes = array(), $hidden = array())
{
- $attributes['enctype'] = 'multipart/form-data';
+ if (is_string($attributes))
+ {
+ $attributes .= ' enctype="multipart/form-data"';
+ }
+ else
+ {
+ $attributes['enctype'] = 'multipart/form-data';
+ }
+
return form_open($action, $attributes, $hidden);
}
}
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index ba7ab2be7..92765c4e7 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -106,6 +106,7 @@ SVN Revision:
Fixed a bug where Active Record override parameter would not let you disable Active Record if it was enabled in your database config file.
Fixed a bug in reduce_double_slashes() in the String Helper to properly remove duplicate leading slashes (#7585)
Fixed a bug in values_parsing() of the XML-RPC library which prevented NULL variables typed as 'string' from being handled properly.
+ Fixed a bug were form_open_multipart() didn't accept string attribute arguments (#10930).
Version 1.7.2
--
cgit v1.2.3-24-g4f1b