Hi list,
I was investigating issue ZF-2488
http://framework.zend.com/issues/browse/ZF-2488
and I discovered the unit test is failing due to API changes in
Zend_Loader::loadClass()

At the time the unit test was written, Zend_Loader::loadFile() was slightly
different.
See
http://framework.zend.com/fisheye/browse/Zend_Framework/trunk/library/Zend/Loader.php?r=4259

In case $dirs param is null, the function called $found =
self::isReadable($filespec) which tried to validate the file within
include_path and, raised a custom error in case of failure.

Current loadFile implementation
http://framework.zend.com/fisheye/browse/Zend_Framework/trunk/library/Zend/Loader.php?r=7726
no longer perform any additional check in case $dirs is null and directly
call include or include_once on raw file even if it doesn't exists.

This causes a PHP error/warning instead of a custom Zend_Exception error.
This is basically the reason why the unit test for Zend_Service_StrikeIron
fails.

Now, my question is: is it a feature or a mistake?

-- 
View this message in context: 
http://www.nabble.com/Is-is-safe-to-delegate-to-a-PHP-error-instead-of-a-custom-check--tp15490466s16154p15490466.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to