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

Issue Type: Improvement Created: 2007-11-28T15:24:26.000+0000 Last Updated: 2008-02-08T14:16:40.000+0000 Status: Resolved Fix version(s): Reporter: julien PAULI (doctorrock83) Assignee: julien PAULI (doctorrock83) Tags: - Zend_Db_Table

Related issues: - ZF-2393

Attachments: - Zend_Db_Table_Abstract-ZF2244.patch


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


Posted by julien PAULI (doctorrock83) on 2008-02-07T02:38:07.000+0000

Here is the patch

Posted by Darby Felton (darby) on 2008-02-07T08:46:22.000+0000

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. :)

Posted by julien PAULI (doctorrock83) on 2008-02-07T09:43:12.000+0000

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).

Posted by Darby Felton (darby) on 2008-02-07T09:50:51.000+0000

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

Posted by julien PAULI (doctorrock83) on 2008-02-07T18:00:19.000+0000

Fixed in r7859

Have you found an issue?

See the Overview section for more details.


© 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.