]> granicus.if.org Git - php/commitdiff
fix for #7756 and #6743 : fatal error on 'include("")' instead of warning
authorHartmut Holzgraefe <hholzgra@php.net>
Sat, 11 Nov 2000 10:15:59 +0000 (10:15 +0000)
committerHartmut Holzgraefe <hholzgra@php.net>
Sat, 11 Nov 2000 10:15:59 +0000 (10:15 +0000)
(+ some cleanup)

main/fopen_wrappers.c

index 48e567b9d2fe80ca5a9eadd89588c06d93136180..752cd1ac5da241bcd69e3f0e2adfd6464a98868b 100644 (file)
@@ -241,12 +241,13 @@ PHPAPI FILE *php_fopen_wrapper(char *path, char *mode, int options, int *issock,
 {
        PLS_FETCH();
 
+    if(!path) return NULL;
+       if(!*path) return NULL;
+
        if (opened_path) {
                *opened_path = NULL;
        }
 
-       /* FIXME  Lets not get in the habit of doing stuff like this.  This should
-          be runtime enabled, NOT compile time. */
        if(PG(allow_url_fopen)) {
                if (!(options & IGNORE_URL)) {
                        return php_fopen_url_wrapper(path, mode, options, issock, socketd, opened_path);
@@ -477,12 +478,6 @@ static FILE *php_fopen_url_wrapper(const char *path, char *mode, int options, in
        return NULL;
 }
 
-PHPAPI int php_is_url(char *path)
-{
-       return (!strncasecmp(path, "http://", 7) || !strncasecmp(path, "ftp://", 6));
-}
-
-
 PHPAPI char *php_strip_url_passwd(char *url)
 {
        register char *p = url, *url_start;