diff options
| author | Ilia Alshanetsky <iliaa@php.net> | 2002-12-10 16:37:48 +0000 |
|---|---|---|
| committer | Ilia Alshanetsky <iliaa@php.net> | 2002-12-10 16:37:48 +0000 |
| commit | 507b8cd4bad18cd02448f44ebf60820955d82fea (patch) | |
| tree | 03a15435cea907ced2c0d69c69c9c013f35c8a83 | |
| parent | 3fbd4431f966bf7f42e2ee926428ebe49989592c (diff) | |
| download | php-git-507b8cd4bad18cd02448f44ebf60820955d82fea.tar.gz | |
Fix for bug #20831.
| -rwxr-xr-x | main/streams.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/main/streams.c b/main/streams.c index 83d2b9250a..f49f7549e6 100755 --- a/main/streams.c +++ b/main/streams.c @@ -1768,16 +1768,12 @@ PHPAPI php_stream *_php_stream_fopen(const char *filename, const char *mode, cha if (fp) { /* sanity checks for include/require */ if (options & STREAM_OPEN_FOR_INCLUDE && (fstat(fileno(fp), &st) == -1 || !S_ISREG(st.st_mode))) { - int is_unc = 0; - #ifdef PHP_WIN32 /* skip the sanity check; fstat doesn't appear to work on * UNC paths */ - is_unc = IS_UNC_PATH(filename, strlen(filename)); -#endif - if (!is_unc) { + if (!IS_UNC_PATH(filename, strlen(filename))) +#endif goto err; - } } ret = php_stream_fopen_from_file_rel(fp, mode); |
