diff options
author | foobar <sniper@php.net> | 2003-09-02 01:22:02 +0000 |
---|---|---|
committer | foobar <sniper@php.net> | 2003-09-02 01:22:02 +0000 |
commit | 62d2810cfc5ec1aef988ae98e3dc65dfcfdf393a (patch) | |
tree | 9743c658e150b58de2a970a773e8a5c47be7f25e | |
parent | a383ff01e6a3a1b936f3bfdd2bd34c93ed2e36f7 (diff) | |
download | php-git-62d2810cfc5ec1aef988ae98e3dc65dfcfdf393a.tar.gz |
- Fixed bug #25343 (is_dir() gives warning on FreeBSD).
-rw-r--r-- | ext/standard/filestat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c index f0c837198d..50a2c6d11c 100644 --- a/ext/standard/filestat.c +++ b/ext/standard/filestat.c @@ -607,7 +607,7 @@ static void php_stat(const char *filename, php_stat_len filename_length, int typ BG(lsb).st_mode = 0; /* mark lstat buf invalid */ #endif if (VCWD_STAT(BG(CurrentStatFile), &BG(sb)) == -1) { - if (!IS_LINK_OPERATION(type) && (!IS_EXISTS_CHECK(type) || errno != ENOENT)) { /* fileexists() test must print no error */ + if (!IS_LINK_OPERATION(type) && (!IS_EXISTS_CHECK(type) || (errno != ENOENT && errno != ENOTDIR))) { /* fileexists() test must print no error */ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Stat failed for %s (errno=%d - %s)", BG(CurrentStatFile), errno, strerror(errno)); } efree(BG(CurrentStatFile)); @@ -623,7 +623,7 @@ static void php_stat(const char *filename, php_stat_len filename_length, int typ if (IS_LINK_OPERATION(type) && !BG(lsb).st_mode) { /* do lstat if the buffer is empty */ if (VCWD_LSTAT(filename, &BG(lsb)) == -1) { - if (!IS_EXISTS_CHECK(type) || errno != ENOENT) { /* fileexists() test must print no error */ + if (!IS_EXISTS_CHECK(type) || (errno != ENOENT && errno != ENOTDIR)) { /* fileexists() test must print no error */ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Lstat failed for %s (errno=%d - %s)", BG(CurrentStatFile), errno, strerror(errno)); } RETURN_FALSE; |