Issues

ZF-5905: Zend_Captcha_Word requires Zend_Loader autoloader to be used

Issue Type: Bug Created: 2009-02-27T03:07:13.000+0000 Last Updated: 2009-02-27T10:33:16.000+0000 Status: Resolved Fix version(s): - 1.7.7 (16/Mar/09)

Reporter: Ben Scholzen (dasprid) Assignee: Stanislav Malyshev (stas) Tags: - Zend_Captcha

Related issues: Attachments:

Description

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:

<pre class="highlight">
<?php
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

Comments

Posted by julien PAULI (doctorrock83) on 2009-02-27T05:09:26.000+0000

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.

Posted by Stanislav Malyshev (stas) on 2009-02-27T10:33:10.000+0000

fixed, thanks

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