ZF-12356: Zend_Loader's loadFile() method always returns true.


On the page…, it says that the loadFile() method "returns boolean FALSE on failure, for example if the specified file does not exist." This appears to not be the case. As far as I can tell, the loadFile() method always returns true.


Patch added.

The above patch fixes the documentation, but, if possible, I think it would be better to have the loadFile() method return TRUE or FALSE, as the original documentation says.

Warnings could be suppressed by using {{@include}} and {{@include_once}}, but I'm not sure how we would check to see if the file had been successfully loaded. We could do something like this:

if((@include $file_name) === false) {
   return false;

return true;

But if the included file has code in it to return false, then this will fail. I'm not sure if there's a proper way to check for failure to include files, though, as I don't think surrounding it in a try/catch block would work, either.

Also, how do I attack a patch? I don't see anywhere to do that :\

Updated documentation to match reality as we won't be slowing down loadFile().