ZF-11569: Zend_Text_Figlet silently aborts execution when iconv is not installed
Description
{{Zend_Text_Figlet::render()}} calls {{iconv_strlen}} prefixed with the @ error suppression operator.
If iconv is not installed, this causes the script to abort without displaying any error message.
As {{Zend_Text_Figlet}} is used during the Getting Started tutorial, recommend that it include an explicit check for iconv, or better yet, avoids the use of @
I've patched my own installation of Zend Framework to include the following inside the render method
if (!extension_loaded('iconv')) {
throw new Zend_Text_Figlet_Exception('Zend_text_Figlet requires iconv extension to be present');
}
Comments
Posted by Ben Scholzen (dasprid) on 2011-07-16T12:50:24.000+0000
The iconv extension is enabled by defaul (see http://php.net/manual/en/…). Thus it is used in the entire Framework without explicitly checking for it.