ZF-9251: @ still generates errors in logs

Issue Type: Bug Created: 2010-02-24T04:15:29.000+0000 Last Updated: 2010-02-24T10:05:56.000+0000 Status: Resolved Fix version(s): - 1.10.1 (10/Feb/10)

Reporter: Martijn Korse (themarty) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Loader

Related issues: Attachments:


The isReadable method in Zend_Loader does an fopen on the filename to see if it is readable. Any errors are ignored by a preceding @. If a custom error-handler is defined, it will still be triggered though which is very annoying.

It can be easily fixed by first doing a file_exists() before attempting to open it.

Of course it can be reasoned the programmer should do this step himself, before asking if a file is readable. In that case Zend_Load_PluginLoader::load() (and possibly other methods in the framework) should be adjusted and do the file_exists() before calling isReadable.


Posted by Matthew Weier O'Phinney (matthew) on 2010-02-24T05:29:24.000+0000

The algorithm for Zend_Loader::isReadable() was updated for 1.10.1, and removed the error suppression operator (fopen() is no longer used).

Please always check against the most current version before creating reports to see if the issue still exists.

Posted by Martijn Korse (themarty) on 2010-02-24T10:05:56.000+0000

Ah, my mistake then.

This bug had been bothering me for a while. I recently downloaded the latest version and found it still existed but hadn't come around filing the bug report yet. I didn't think a new version had already been released in the short timespace since, let alone one that had discovered the bug and fixed it :-) What are the odds!

I'll be more careful next time ;-)

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.