diff options
author | Hartmut Holzgraefe <hholzgra@php.net> | 2000-11-11 10:15:59 +0000 |
---|---|---|
committer | Hartmut Holzgraefe <hholzgra@php.net> | 2000-11-11 10:15:59 +0000 |
commit | 38569740da486809ee5b1a309c82cb364397932a (patch) | |
tree | 51a99ee5164b6c532be2e492eaa12f8682a0e3bc /main/fopen_wrappers.c | |
parent | 56d673217cb1ba8f323bf5bfd710c066b2b7067f (diff) | |
download | php-git-38569740da486809ee5b1a309c82cb364397932a.tar.gz |
fix for #7756 and #6743 : fatal error on 'include("")' instead of warning
(+ some cleanup)
Diffstat (limited to 'main/fopen_wrappers.c')
-rw-r--r-- | main/fopen_wrappers.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c index 48e567b9d2..752cd1ac5d 100644 --- a/main/fopen_wrappers.c +++ b/main/fopen_wrappers.c @@ -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; |