Issues

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

Issue Type: Bug Created: 2008-03-24T16:43:33.000+0000 Last Updated: 2008-07-25T23:30:35.000+0000 Status: Resolved Fix version(s): - 1.5.3 (28/Jul/08)

Reporter: Indrek Altpere (efbiaiinzinz) Assignee: Ralph Schindler (ralph) Tags: - Zend_Loader

Related issues: - ZF-2985

Attachments:

Description

<pre class="highlight">
    public static function isReadable($filename)
    {
        if (!$fh = @fopen($filename, 'r', true)) {
            return false;
        }

        return true;
    }

should be changed to

<pre class="highlight">
    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

Posted by Wil Sinclair (wil) on 2008-03-25T20:57:13.000+0000

Please categorize/fix as needed.

Posted by old of Satoru Yoshida (yoshida@zend.co.jp) on 2008-04-14T19:45:48.000+0000

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

Posted by Ralph Schindler (ralph) on 2008-04-22T09:52:53.000+0000

Updating project management info.

Posted by Jens Ljungblad (pakmannen) on 2008-05-07T10:22:49.000+0000

You might want to be sure fclose doesn't fail

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

Posted by old of Satoru Yoshida (yoshida@zend.co.jp) on 2008-05-14T07:12:50.000+0000

I believe it is resolved by ZF-2985

Posted by Jens Ljungblad (pakmannen) on 2008-05-16T01:36:52.000+0000

I don't believe this was fixed

Posted by Ralph Schindler (ralph) on 2008-07-25T23:30:35.000+0000

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

Have you found an issue?

See the Overview section for more details.

Copyright

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

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

Contacts