diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c index eac8e6f4020..4521eac49ce 100644 --- a/main/fopen_wrappers.c +++ b/main/fopen_wrappers.c @@ -490,7 +490,13 @@ PHPAPI FILE *php_fopen_with_path(char *filename, char *mode, char *path, char ** */ PHPAPI char *php_strip_url_passwd(char *url) { - register char *p = url, *url_start; + register char *p, *url_start; + + if (url == NULL) { + return NULL; + } + + p = url; while (*p) { if (*p==':' && *(p+1)=='/' && *(p+2)=='/') {