#1171: AgaviValidationManager produces a notice when exporting flattened values
array
-----------------------------------------+----------------------------------
Reporter: sven.kretschm...@… | Owner: dominik
Type: defect | Status: new
Priority: normal | Milestone: 1.0.2
Component: validation | Version: 1.0.1
Severity: normal | Keywords:
Has_patch: 0 |
-----------------------------------------+----------------------------------
Actually the notice is thrown in AgaviParameterHolder:
{{{
Notice: Only variable references should be returned by reference in
agavi/util/AgaviParameterHolder.class.php on line 174
}}}
The call gets made by the AgaviValidationManager in line 331:
{{{
if(!isset($succeededArguments[$source . '/' . $name]) && (!$umap ||
($source != AgaviRequestDataHolder::SOURCE_PARAMETERS || ($name != $ma &&
$name != $aa)))) {
$parameters->remove($source, $name);
}
}}}
Code in the validator to reproduce:
{{{
$values = $this->getData($this->getArgument());
$flat_values = AgaviArrayPathDefinition::flatten($values);
$this->export($flat_values, $this->getArgument());
}}}
The notice comes up on removing the parameters from the request data
holder. As the key already contains the closing brace "]" from the flatten
process, it is duplicated when generating the flat key names and thus the
names do not match any more.
--
Ticket URL: <http://trac.agavi.org/ticket/1171>
Agavi <http://www.agavi.org/>
An MVC Framework for PHP5
_______________________________________________
Agavi Tickets Mailing List
[email protected]
http://lists.agavi.org/mailman/listinfo/tickets