summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2012-06-21 16:21:29 +0200
committerPhil Sturgeon <email@philsturgeon.co.uk>2012-06-21 16:21:29 +0200
commitcacabd6fac8a184723f5269643adc4c12ca1ab2f (patch)
tree7fa84f0f76f9c9d5b47f0ce3252754980a68083f
parent3b6af434b13168828429d06aae7699f6f9537a87 (diff)
parent8d3099d4e5261e0f044c7fcd8b3ab7724645aa8d (diff)
Merge branch 'develop' of github.com:EllisLab/CodeIgniter into develop
-rw-r--r--system/database/DB_driver.php2
-rw-r--r--system/libraries/Form_validation.php3
-rw-r--r--tests/codeigniter/helpers/date_helper_test.php6
-rw-r--r--user_guide_src/source/changelog.rst1
4 files changed, 5 insertions, 7 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index 4ec20f45d..a99444167 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -1281,7 +1281,7 @@ abstract class CI_DB_driver {
if (isset($call['file']) && strpos($call['file'], BASEPATH.'database') === FALSE)
{
// Found it - use a relative path for safety
- $message[] = 'Filename: '.str_replace(array(BASEPATH, APPPATH), '', $call['file']);
+ $message[] = 'Filename: '.str_replace(array(APPPATH, BASEPATH), '', $call['file']);
$message[] = 'Line Number: '.$call['line'];
break;
}
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index db773e252..4bb29e41b 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -571,8 +571,7 @@ class CI_Form_validation {
{
foreach ($postdata as $key => $val)
{
- $this->_execute($row, $rules, $val, $cycles);
- $cycles++;
+ $this->_execute($row, $rules, $val, $key);
}
return;
diff --git a/tests/codeigniter/helpers/date_helper_test.php b/tests/codeigniter/helpers/date_helper_test.php
index 8258c9248..4e01b1aa3 100644
--- a/tests/codeigniter/helpers/date_helper_test.php
+++ b/tests/codeigniter/helpers/date_helper_test.php
@@ -48,11 +48,9 @@ class Date_helper_test extends CI_TestCase {
*/
- $this->ci_set_config('time_reference', 'UTC');
-
$this->assertEquals(
- gmmktime(date('G'), date('i'), date('s'), date('n'), date('j'), date('Y')),
- now()
+ mktime(gmdate('G'), gmdate('i'), gmdate('s'), gmdate('n'), gmdate('j'), gmdate('Y')),
+ now('UTC')
);
}
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index da608b162..8a6c922a4 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -290,6 +290,7 @@ Bug fixes for 3.0
- Fixed a bug (#999) - :doc:`Config Library <libraries/config>` method site_url() always appended ``$config['url_suffix']`` to the end of the URL string, regardless of wether a query string exists in it.
- Fixed a bug where :doc:`URL Helper <helpers/url_helper>` function anchor_popup() ignored the attributes argument if it is not an array.
- Fixed a bug (#1328) - :doc:`Form Validation Library <libraries/form_validation>` didn't properly check the type of the form fields before processing them.
+- Fixed a bug (#79) - :doc:`Form Validation Library <libraries/form_validation>` didn't properly validate array fields that use associative keys or have custom indexes.
Version 2.1.1
=============