From: Ilia Alshanetsky Date: Tue, 10 Dec 2002 16:39:59 +0000 (+0000) Subject: MFB X-Git-Tag: RELEASE_1_0b3~77 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e982d5c7f0f789840fcbbb56d7f5e007308bae7c;p=php MFB --- diff --git a/main/streams.c b/main/streams.c index eaf9c5b0f6..7c40be6dea 100755 --- a/main/streams.c +++ b/main/streams.c @@ -1770,16 +1770,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 = (filename[0] == '\\' && filename[1] == '\\'); + if (!IS_UNC_PATH(filename, strlen(filename))) #endif - if (!is_unc) { goto err; - } } ret = php_stream_fopen_from_file_rel(fp, mode);