Issues

ZF-2959: Zend_Loader::isReadable() keeps file handles open

Description


    public static function isReadable($filename)
    {
        if (!$fh = @fopen($filename, 'r', true)) {
            return false;
        }

        return true;
    }

should be changed to


    public static function isReadable($filename)
    {
        if (!$fh = @fopen($filename, 'r', true)) {
            return false;
        }
        fclose($fh);
        return true;
    }

to stop open file handles building up with each invocation of the function

Comments

Please categorize/fix as needed.

Hi, Ralph. If you are OK, Would I fix also this when I would fix ZF-2985 ?

Updating project management info.

You might want to be sure fclose doesn't fail

 
public static function isReadable($filename)
{
    if (!$fh = @fopen($filename, 'r', true)) {
        return false;
    }
    return fclose($fh);
}

I believe it is resolved by ZF-2985

I don't believe this was fixed

Fixed in trunk in r10454 Fixed in release 1.5 in r10455 Rixed in release 1.6 in r10456