Hi all,
I looked up in the cake core code and found that there are to methods
that generate the fields hash. The first is in the form helper and
generates the fields hash that's displayed at the end of the form. The
second one generates a fields hash based on the submitted fields in
the Security Components _validatePost method for comparing with the
submitted fields hash from the form helper.
I compared these to methods of generating the fields hash and found
the following code in the _validatePost method that's missing in the
form helper:
$multi = array();
foreach ($fieldList as $i => $key) {
if (preg_match('/\.\d+$/', $key)) {
$multi[$i] = preg_replace('/\.\d+$/', '', $key);
unset($fieldList[$i]);
}
}
if (!empty($multi)) {
$fieldList += array_unique($multi);
}
I doesn't found the sense of these code and it's logical that the
validation fails when the fields hash is generated in different ways.
When I deactivate the code above, the validation works correctly.
Do you know any sense of these lines or can I remove them from the
code?
Thanks a lot for your answers!
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en