Greetings --

Several people have noted issues with loading controller classes in the
MVC layer with the 1.0.3 release. I've traced this problem, with the
help of some community contributors, to one particular use case.

Basically, if you're using the following:

    function __autoload($class)
    {
        return Zend_Loader::loadClass($class);
    }

you may be affected.

The established standard in ZF for autoloading is to use the following:

    Zend_Loader::registerAutoload();

This registers Zend_Loader::loadClass() as an autoloader with
spl_autoload, which is more fault tolerant when exceptions are thrown by
the various handlers.

So, if you find that you're getting exceptions thrown in your MVC apps
-- i.e., that your controller class files are not being found -- check
to see if you're using autoloading, and if so, use the
registerAutoload() solution.

For those of you wanting a better fix, there is now a patch to
Zend_Controller_Dispatcher_Standard in both trunk and the release-1.0
branch that fixes the issue by making sure that calls to class_exist()
suppress autoloading.

-- 
Matthew Weier O'Phinney
PHP Developer            | [EMAIL PROTECTED]
Zend - The PHP Company   | http://www.zend.com/

Reply via email to