Zend Framework

Zend_Db_Table_Rowset_Abstract loading classes with @

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Duplicate
  • Affects Version/s: 1.5.0
  • Fix Version/s: None
  • Component/s: Zend_Db_Table
  • Labels:
    None

Description

I noticed Zend_Db_Table_Abstract and also Zend_Db_Table_Rowset_Abstract use the static method Zend_Loader::loadClass() with an @ to suppress errors, in particular to load developer defined classes which inherit from Zend_Db_Table_Row & co.
If an error is found in the class definition, the script will stop without outputting anything and this could make hard for the developer to find, for instance, a simple parse error. In my case I had to add single echo calls in Zend files to find out the point where the script halts.
I don't know why the @ is there, but I think it's a best practise to raise an exception from the loadClass() method if necessary.

Issue Links

Activity

Hide
Wil Sinclair added a comment -

Please evaluate and categorize as necessary.

Show
Wil Sinclair added a comment - Please evaluate and categorize as necessary.
Hide
Satoru Yoshida added a comment -

I resolved ZF-2985 today. Please tell me if ZF-2985 causes something wrong.

Show
Satoru Yoshida added a comment - I resolved ZF-2985 today. Please tell me if ZF-2985 causes something wrong.
Hide
Darby Felton added a comment -

Resolved as duplicate of ZF-2724.

Show
Darby Felton added a comment - Resolved as duplicate of ZF-2724.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: