[eluser]Unknown[/eluser]
After some research in the form_validation.php library i came to the conclusion, that this could really be a bug.
For me it worked after replacing the recursive call at the top of _execute by a new one:
Code:
function _execute($row, $rules, $postdata = NULL, $cycles = 0)
{
// If the $_POST data is an array we will run a recursive call
if (is_array($postdata))
{
foreach ($postdata as $key => $val)
{
//$this->_execute($row, $rules, $val, $cycles); // THIS IS WHAT CI DOES USUALLY
$this->_execute($row, $rules, $val, $key); // THIS IS WHAT SOLVED MY PROBLEM
$cycles++;
}
return;
}
// ... and so on
$cycles is later used as the array index of the posted array. but it always starts to count at 0, so if we have unordered array indices (which is in fact possible by giving the form element a concrete index in the name field), it would not work.
BUT: i did not test this for other solutions than mine, for example multidimensional arrays