-
Notifications
You must be signed in to change notification settings - Fork 3k
stat() calls are missing warnings #2999
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
SiebelsTim
added a commit
to SiebelsTim/hhvm
that referenced
this issue
Jun 20, 2014
This could be pulled in without the test. However the test will fail because no warnings are thrown (See facebook#2999) This tries to fix zend/bad/ext/spl/tests/DirectoryIterator_getInode_error.php
Looks like there had been a (now abandoned) PR for this. @JoelMarcey are you looking into it? |
Ah, okay. |
Because is_dir is a testing function, it should not throw warnings if target does not exist. Even your 3v4l snippet does not throw a warning in PHP. |
Majkl578
added a commit
to Majkl578/hhvm
that referenced
this issue
Oct 31, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PHP says to raise a warning on bad
stat()
calls in C(https://github.com/php/php-src/blob/af6c11c5f060870d052a2b765dc634d9e47d0f18/ext/standard/filestat.c#L909)
PHP's manual agrees on this:
http://de3.php.net/manual/en/function.is-dir.php#refsect1-function.is-dir-errors (and many others)
However I could not get a warning on
is_dir
:http://3v4l.org/kG9PX
Tried to fix with
The text was updated successfully, but these errors were encountered: