trying to open non-existing files (which get suppressed).
Why not use file_exists in conjuction with file_open? It won't give (as
many) errors with the same implementation.
There was an alternative fix, but it got revert because it broke the BC
(which is what?).
SO:
public static function isReadable($filename)
{
if (!file_exists($filename) || !$fh = @fopen($filename, 'r', true))
{
return false;
}
@fclose($fh);
return true;
}
--
View this message in context: http://www.nabble.com/Zend_Loader%3A%3AisReadable-fix-tp20326421p20326421.html
Sent from the Zend Core mailing list archive at Nabble.com.
没有评论:
发表评论