summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-10-25 15:59:17 +0200
committerAndrey Andreev <narf@bofh.bg>2012-10-25 15:59:17 +0200
commit60b97145a0cb1c3bba35ec68be7eae911b2b331c (patch)
treed8ac3850f049fbabe07668d1c87f2d971f16c92f
parente47425844e84d54c659280c04f450a3526b4e09d (diff)
Form helpers to ignore empty name attributes (fix #1506)
-rw-r--r--system/helpers/form_helper.php4
-rw-r--r--user_guide_src/source/changelog.rst1
2 files changed, 5 insertions, 0 deletions
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php
index 1bccac35c..3cce8688f 100644
--- a/system/helpers/form_helper.php
+++ b/system/helpers/form_helper.php
@@ -921,6 +921,10 @@ if ( ! function_exists('_parse_form_attributes'))
{
$val = form_prep($val, $default['name']);
}
+ elseif ($key === 'name' && ! strlen($default['name']))
+ {
+ continue;
+ }
$att .= $key.'="'.$val.'" ';
}
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index d3cebc7cc..477440675 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -381,6 +381,7 @@ Bug fixes for 3.0
- Fixed a bug (#1255) - :doc:`User Agent Library <libraries/user_agent>` method ``is_referral()`` only checked if ``$_SERVER['HTTP_REFERER']`` exists.
- Fixed a bug (#1146) - :doc:`Download Helper <helpers/download_helper>` function ``force_download()`` incorrectly sent *Cache-Control* directives *pre-check* and *post-check* to Internet Explorer.
- Fixed a bug (#1811) - :doc:`URI Library <libraries/uri>` didn't properly cache segments for ``uri_to_assoc()`` and ``ruri_to_assoc()``.
+- Fixed a bug (#1506) - :doc:`Form Helpers <helpers/form_helper>` set empty *name* attributes.
Version 2.1.3
=============