Issues

ZF-1811: Fail gracefully if hash extension is not present.

Issue Type: Bug Created: 2007-08-03T20:35:19.000+0000 Last Updated: 2008-02-26T12:56:06.000+0000 Status: Resolved Fix version(s): - 1.0.4 (26/Feb/08)

Reporter: Bill Karwin (bkarwin) Assignee: Darby Felton (darby) Tags: - Zend_Auth

Related issues: Attachments: - Http.php.diff

Description

Zend_Auth_Adapter_Http uses the hash() function, but does not check for presence of the hash extension. Even though this is a standard extension and is enabled by default in most distributions of PHP, we should consider checking for presence of the extension, and fail with an informative exception if it is not.

Comments

Posted by Darby Felton (darby) on 2007-09-20T15:50:39.000+0000

Graceful failure upon the unavailability of an extension applies to more than just Zend_Auth_Adapter_Http and the hash extension, since other components use extension functions unconditionally.

  • iconv - Zend_Currency, Zend_Locale, Zend_Pdf, Zend_Search, et al
  • mbstring - Zend_Feed

I'm sure there are many more examples, too. Shall we search for such cases and create additional issues?

Posted by Jordan Ryan Moore (jordanryanmoore) on 2007-12-18T13:30:06.000+0000

Attaching patch that throws an exception when the extension isn't available.

Posted by Darby Felton (darby) on 2008-01-29T15:00:52.000+0000

Resolved for 1.5.0 RC1 with SVN r7689.

Posted by Darby Felton (darby) on 2008-01-29T15:03:44.000+0000

Resolved for 1.0.4 with SVN r7690.

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