From 06f6e47e4c7662a0d65d3518c88180f66fdb267b Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Thu, 21 Mar 2002 17:02:50 +0000 Subject: Require that wrappers use :// to avoid ambiguities when filenames have ':' characters. This slightly breaks BC with the old style zlib: wrapper. --- ext/standard/php_fopen_wrapper.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ext/standard/php_fopen_wrapper.c') diff --git a/ext/standard/php_fopen_wrapper.c b/ext/standard/php_fopen_wrapper.c index 8677486c52..19aa15a2e4 100644 --- a/ext/standard/php_fopen_wrapper.c +++ b/ext/standard/php_fopen_wrapper.c @@ -34,6 +34,9 @@ php_stream * php_stream_url_wrap_php(char * path, char * mode, int options, char { FILE * fp = NULL; php_stream * stream = NULL; + + if (!strncasecmp(path, "php://", 6)) + path += 6; if (!strcasecmp(path, "stdin")) { fp = fdopen(dup(STDIN_FILENO), mode); -- cgit v1.2.1