summaryrefslogtreecommitdiffstats
path: root/system/libraries/Form_validation.php
diff options
context:
space:
mode:
authorZach Ploskey <zach@ploskey.com>2017-10-04 14:24:53 +0200
committerZach Ploskey <zach@ploskey.com>2017-10-06 12:44:52 +0200
commita088cc47a7104e11d78eac44851779d20bae9cbc (patch)
treeabc1e8e8ad34e376e8347b931a8f003c3210c235 /system/libraries/Form_validation.php
parent4aecaf55f404c627db823f04dd8032c9fb59073c (diff)
Fix issue 5202
Fix attempting to access data_ref before it is defined when validating an array input with multiple explicitly specified keys. Adds a test for the issue. Signed-off-by: Zach Ploskey <zach@ploskey.com>
Diffstat (limited to 'system/libraries/Form_validation.php')
-rw-r--r--system/libraries/Form_validation.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index c1cfcdb8f..0dfb274b2 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -591,6 +591,8 @@ class CI_Form_validation {
}
else
{
+ $data_ref =& $data;
+
// before we assign values, make a reference to the right POST key
if (count($row['keys']) === 1)
{