News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Eran Galperin's Blog:
On the pitfalls of date validation with the Zend Framework
June 22, 2010 @ 12:58:43

On his techfounder.net blog today Eran Galperin talks about one of the issues you might currently see with the date validation in your Zend Framework application - a problem in the Zend_Validation_Date component related to its use of Zend_Locale.

Zend_Date tries to validate dates according to a given format (with a default fallback). The dangerous behavior is that it tries to convert the given format to a localized format using Zend_Locale. Zend_Locale attempts to detect automatically the locale of the requesting client, and it appears that on the machines that were exhibiting the bug, a different locale was determined than those I was testing it on.

His problem was when the method tried to parse a non-localized date format and ended up converting it based on the local machine's locale settings. To correct the issue, since he didn't really need the autodetect local feature anyway, he just manually set the locale in his bootstrap via a registry setting.

0 comments voice your opinion now!
zendframework zenddate validation locate issue


blog comments powered by Disqus

Similar Posts

Padraic Brady's Blog: Zend Framework 1.5 And What The Future Holds

Pádraic Brady's Blog: OpenID library for the Zend Framework?

Zend Developer Zone: Zend Framework is a BOSSie Award Winner

Padraic Brady's Blog: Zend Framework: Surviving The Deep End Book - Chapters 4, 5, 6, 7 and Appendix

Yet Another Web Development Blog: Dear PHP, I think it's time we broke up.


Community Events





Don't see your event here?
Let us know!


introduction bugfix framework developer series language opinion community podcast interview deployment list api laravel tips conference zendserver symfony library release

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework