cvs: php4 /main fopen-wrappers.c

From: Date: Sat, 11 Nov 2000 10:15:59 +0000
Subject: cvs: php4 /main fopen-wrappers.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-2555@lists.php.net to get a copy of this message
hholzgra Sat Nov 11 02:15:59 2000 EDT Modified files: /php4/main fopen-wrappers.c Log: fix for #7756 and #6743 : fatal error on 'include("")' instead of warning (+ some cleanup) Index: php4/main/fopen-wrappers.c diff -u php4/main/fopen-wrappers.c:1.106 php4/main/fopen-wrappers.c:1.107 --- php4/main/fopen-wrappers.c:1.106 Thu Nov 2 15:30:48 2000 +++ php4/main/fopen-wrappers.c Sat Nov 11 02:15:59 2000 @@ -16,7 +16,7 @@ | Jim Winstead <jimw@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: fopen-wrappers.c,v 1.106 2000/11/02 23:30:48 andi Exp $ */ +/* $Id: fopen-wrappers.c,v 1.107 2000/11/11 10:15:59 hholzgra Exp $ */ #include "php.h" #include "php_globals.h" @@ -241,12 +241,13 @@ { 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); @@ -476,12 +477,6 @@ php_error(E_WARNING, "Invalid URL specified, %s", path); 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) {

« previous php.cvs (#2555) next »