#46443 [Bgs]: closedir and readdir DO work for file resource
ID: 46443 User updated by: hostmaster at uuism dot net Reported By: hostmaster at uuism dot net Status: Bogus Bug Type: Directory function related Operating System: Fedora Core 4 PHP Version: 5.2.6 New Comment: All the ext/standard/tests/dir/ tests pass with php5.2-200810312330. Thanks. Jim Previous Comments: [2008-10-31 22:52:55] hostmaster at uuism dot net updated Summary [2008-10-31 22:51:48] hostmaster at uuism dot net I'm having the same kind of results with ext/standard/tests/dir/readdir_variation7.phpt. [2008-10-31 22:45:34] [EMAIL PROTECTED] See Bug #46440. Thanks. [2008-10-31 22:38:12] hostmaster at uuism dot net Description: When I run ext/standard/tests/dir/closedir_variation3.phpt with PHP 5.2.6, the closedir() function works with a file resource. This test script expects it not to work, so the test fails. I'm see this kind of test failure in a number of cases. Is there some kind of configuration option for allowing php with sloppy syntax? Thanks. Jim PS. This may the same issue as Bug #44246: closedir() accepts a file resource opened by fopen() Reproduce code: --- Expected result: *** Testing closedir() : usage variations *** -- Open a file using fopen() -- resource(%d) of type (stream) -- Try to close the file pointer using closedir() -- Warning: closedir(): %d is not a valid Directory resource in %s on line %d bool(false) -- Check file pointer: -- resource(%d) of type (stream) Actual result: -- *** Testing closedir() : usage variations *** -- Open a file using fopen() -- resource(5) of type (stream) -- Try to close the file pointer using closedir() -- NULL -- Check file pointer: -- resource(5) of type (Unknown) -- Edit this bug report at http://bugs.php.net/?id=46443&edit=1
#46443 [Bgs]: closedir and readdir DO work for file resource
ID: 46443 User updated by: hostmaster at uuism dot net -Summary: closedir DOES work for file resource Reported By: hostmaster at uuism dot net Status: Bogus Bug Type: Directory function related Operating System: Fedora Core 4 PHP Version: 5.2.6 New Comment: updated Summary Previous Comments: [2008-10-31 22:51:48] hostmaster at uuism dot net I'm having the same kind of results with ext/standard/tests/dir/readdir_variation7.phpt. [2008-10-31 22:45:34] [EMAIL PROTECTED] See Bug #46440. Thanks. [2008-10-31 22:38:12] hostmaster at uuism dot net Description: When I run ext/standard/tests/dir/closedir_variation3.phpt with PHP 5.2.6, the closedir() function works with a file resource. This test script expects it not to work, so the test fails. I'm see this kind of test failure in a number of cases. Is there some kind of configuration option for allowing php with sloppy syntax? Thanks. Jim PS. This may the same issue as Bug #44246: closedir() accepts a file resource opened by fopen() Reproduce code: --- Expected result: *** Testing closedir() : usage variations *** -- Open a file using fopen() -- resource(%d) of type (stream) -- Try to close the file pointer using closedir() -- Warning: closedir(): %d is not a valid Directory resource in %s on line %d bool(false) -- Check file pointer: -- resource(%d) of type (stream) Actual result: -- *** Testing closedir() : usage variations *** -- Open a file using fopen() -- resource(5) of type (stream) -- Try to close the file pointer using closedir() -- NULL -- Check file pointer: -- resource(5) of type (Unknown) -- Edit this bug report at http://bugs.php.net/?id=46443&edit=1