ZF-5905: Zend_Captcha_Word requires Zend_Loader autoloader to be used


When not using Zend_Loader autoloader, and you want to use Zend_Captcha, Zend_Captcha_Word tires to load instantiate Zend_Session_Namespace without requiring it first. Testcase:

require_once 'Zend/View.php';
require_once 'Zend/Captcha/Figlet.php';

$view = new Zend_View();

$captcha = new Zend_Captcha_Figlet(array(
    'name' => 'foo',
    'wordLen' => 4,
    'timeout' => 300,

echo $captcha->render($view);

You'll get this error message: Fatal error: Class 'Zend_Session_Namespace' not found in ..Zend/Captcha/Word.php on line 223


As the class is dynamicly named, I suggest using Zend_Loader::loadClass to try to load the session class name and then throw an exception if problem.

fixed, thanks