ZF-2724: Error supression on calls to loadClass across ZF obscuring parse errors
Hi this relates to error suppressed calls on loadClass by numerous components. See grep -R "@Zend_Loader::loadClass" trunk|grep -v ".svn" So I thought it best to log it here.
As the grep reveals, there are a number of "@Zend_Loader::loadClass" calls across the library. I just spent 30 minutes trying to track down why I had a blank page and no error log messages.
After resorting to: echo "Got this far stabbing in the dark without a flipping error message" in umpteen files, I finally tracked it down to Zend_Db_Table_Abstract::createRow() in this case which was calling "@Zend_Loader::loadClass" on my subclassed version of Zend_Db_Table_Row and supressing the message "Parse error: syntax error, unexpected T_VARIABLE, expecting ';' " - something I'd expect to fix in a second not half an hour littering my files with markers to track it down.
Sorry if my tone sounds peeved but I'd previously been burnt by this same practice occurring in Zend_Loader itself, see: http://framework.zend.com/issues/browse/ZF-2463
This is really frustrating. It's like some kind of copy/paste propagated virus in ZF :D I hope this practice specifically on class loading can be stamped out once and for all. I see no reason why parse errors should ever be suppressed.