summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2008-05-08 00:52:45 +0200
committerDerek Jones <derek.jones@ellislab.com>2008-05-08 00:52:45 +0200
commit40306b5283b2929e344c7e11da7b736b9e51ef43 (patch)
treed4254fa1adf56cfd43d923231dc8498700018245
parent4dc06183aa67ba1911562719c97f41c6a9529075 (diff)
Fixed a bug where $data was not being converted to an array properly in set_rules()
http://codeigniter.com/bug_tracker/bug/4220/
-rw-r--r--system/libraries/Validation.php2
-rw-r--r--user_guide/changelog.html1
2 files changed, 2 insertions, 1 deletions
diff --git a/system/libraries/Validation.php b/system/libraries/Validation.php
index 16e8cd74f..f628d8612 100644
--- a/system/libraries/Validation.php
+++ b/system/libraries/Validation.php
@@ -117,7 +117,7 @@ class CI_Validation {
if ($rules == '')
return;
- $data[$data] = $rules;
+ $data = array($data => $rules);
}
foreach ($data as $key => $val)
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index ea14a3961..6521636b6 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -116,6 +116,7 @@ SVN Commit: not currently released</p>
<li>Fixed an AR_caching error where it wasn't tracking table aliases (#3463).</li>
<li>Fixed an AR bug with or_where_not_in() (#4171).</li>
<li>Fixed a bug in the FTP library where delete_dir() was not working recursively (#4215).</li>
+ <li>Fixed a Validation bug when set_rules() is used with a non-array field name and rule (#4220).</li>
<li>Fixed an AR bug when joining with a table alias and table prefix (#4400).</li>
<li>Fixed a bug in DB Forge, when inserting an id field (#3456).</li>
<li>Fixed a bug in the DB class testing the $params argument.</li>