Hey,

while writing the tests for #955 I stumbled over the behavior demonstrated in this snippet:

$p = new AgaviParameterHolder();
$p->setParameter('foo', array('bar' => 'baz', 'ball' => 'round'));
$p->getParameter('foo[bar]'); // baz
$p->setParameter('foo[bar]', 'foo');
$p->getParameter('foo'); // hmm: array('bar' => 'baz', 'ball' => 'round'), expected: array('bar' => 'foo', 'ball' => 'round')
$p->getParameter('foo[bar]'); // foo
$p->unsetParameter('foo[bar]'); // foo
$p->getParameter('foo[bar]'); // baz !!! (instead of null)

This is triggered by AgaviParameterHolder::setParameter() not trying to resolve array parts in the name like get/has/unsetParameter() do. I'd call that unexpected and I'd say it's a bug - it took me nearly 15 minutes to figure out what I was doing wrong in my testcase. However it's a bit unclear how to fix that...

Any insights?

cheers

felix

--
Felix Gilcher

Bitextender GmbH
Paul-Heyse-Str. 6
D-80336 München

T: +49 89 57 08 15 16
F: +49 89 57 08 15 17
M: +49 172 840 88 28

[EMAIL PROTECTED]
http://bitextender.com/

Amtsgericht München, HRB 174280
Geschäftsführer: David Zülke, Florian Clever

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Agavi Dev Mailing List
[email protected]
http://lists.agavi.org/mailman/listinfo/dev

Reply via email to