Issues

ZF-5551: Zend_Translate_Adapter::setOptions() sets disable_notices option after the option was used

Issue Type:

Bug

Created:

2009-01-15T02:40:27.000+0000

Last Updated:

2009-01-20T12:07:08.000+0000

Status:

Resolved

Fix version(s):

1.8.0 (30/Apr/09)

Reporter:

Tomas Brastavicius (tomas)

Assignee:

Thomas Weidner (thomas)

Tags:

Zend_Translate

Related issues:

Attachments:

Description

Zend_Translate_Adapter::setOptions() uses foreach to loop over the options arrays. Assume the following options array:

$options = array(
'locale' => 'en',
'disable_notices' => true
);

On the first loop foreach executes setLocale() method which in turn may use disable_notices option to disable/enable throwing a notice. But disable_notices option is set on the second loop, therefore an 'old' value was used.