ZF-2244: Zend_Db_Table should throw an exception if no adapter could be found


Despite the different methods that we can use to provide Zend_Db_Table an adapter, sometimes we simply forget that. Actually, ZendFramework doesn't care and results in a PHP fatal error trying to describe tables.

A patch is attached to this issue


Here is the patch

The patch looks good. Thanks, Julien! :) One thing I would probably change is to replace "{{get_class($this)}}" with "{{__CLASS__}}", since a function call is more expensive.

Otherwise, Julien, would you please test this patch and commit it for us? You should now have the SVN karma to commit framework code, tests, and documentation.

If you have any problems, please just [e-mail me|], and I'll work with you on it. :)

If you echo CLASS, it will always print 'Zend_Db_Table_Abstract' If you echo get_class($this), it will print the real class $this is instance of ( better for debugging purposes).

Ah, of course. I suspected there may have been good reason to do this, thanks for explaining! :)

Fixed in r7859