]> granicus.if.org Git - php/commit
SplFileObject does not accept directories. It did not check for that and blindly...
authorEtienne Kneuss <colder@php.net>
Thu, 8 Sep 2011 15:52:59 +0000 (15:52 +0000)
committerEtienne Kneuss <colder@php.net>
Thu, 8 Sep 2011 15:52:59 +0000 (15:52 +0000)
commit5cc76630985c153d2d7d8605d85b8829722800d8
tree3d2f23fa191eb7069486ba59e7adffe7322a5772
parentf79814360cd7ab22c8b94906989235480624b821
SplFileObject does not accept directories. It did not check for that and blindly opened the directory, which works on linux but fails on windows. Now SplFileObject uses a stat() call to make sure it isn't a directory, if it is, it fails with an exception. Tests have been changed accordingly.
ext/spl/spl_directory.c
ext/spl/tests/SplFileObject_fflush_basic_001.phpt
ext/spl/tests/SplFileObject_ftruncate_error_001.phpt
ext/spl/tests/fileobject_003.phpt