Issues

ZF-3290: Zend_Locale::setDefault should check input type and react with Exception

Issue Type: Bug Created: 2008-05-19T01:11:50.000+0000 Last Updated: 2008-09-02T10:39:30.000+0000 Status: Resolved Fix version(s): - 1.6.0 (02/Sep/08)

Reporter: Matej Humpál (finwe) Assignee: Thomas Weidner (thomas) Tags: - Zend_Locale

Related issues: Attachments:

Description

When inserting non-string value to Zend_Locale::setDefault, PHP warning is issued:

Warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in ... on line 240

Zend_Locale should check type of parameter and throw an Exception in case the variable !is_string()

Comments

Posted by Thomas Weidner (thomas) on 2008-05-19T09:08:40.000+0000

And why do you think is there a API doc where "string" is defined as input format ?

Posted by Matej Humpál (finwe) on 2008-05-20T09:53:24.000+0000

Well, I certainly would not try to force non-string value as a parameter, but phpdoc will not prevent me to do so by mistake. Moreover, ZF converts PHP errors to exceptions (or prevents them in the first place) on so many other places, so I don't see a reason why not to do so in this case.

Posted by Thomas Weidner (thomas) on 2008-06-05T05:24:11.000+0000

There is no array_key_exists call within the trunk. Seems to be fixed somewhere in the past.

Posted by Wil Sinclair (wil) on 2008-09-02T10:39:30.000+0000

Updating for the 1.6.0 release.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts