From dadaee4171300a62ec8d38587c7d754d17d58a62 Mon Sep 17 00:00:00 2001 From: Rui Hirokawa Date: Tue, 2 Jul 2002 15:28:14 +0000 Subject: [PATCH] *** empty log message *** --- main/rfc1867.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/main/rfc1867.c b/main/rfc1867.c index 549ffa4d76..2f7d31bb0f 100644 --- a/main/rfc1867.c +++ b/main/rfc1867.c @@ -32,6 +32,9 @@ #include "php_variables.h" #include "rfc1867.h" +#if HAVE_MBSTRING +#include "ext/mbstring/mbstring.h" +#endif #undef DEBUG_FILE_UPLOAD @@ -58,6 +61,8 @@ #define UPLOAD_ERROR_D 4 /* No file uploaded */ #define UPLOAD_ERROR_E 5 /* Uploaded file size 0 bytes */ + + static void add_protected_variable(char *varname TSRMLS_DC) { int dummy=1; @@ -823,7 +828,11 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) sprintf(lbuf, "%s_name", param); } +#if HAVE_MBSTRING + s = mbstr_strrchr(filename, '\\'); +#else s = strrchr(filename, '\\'); +#endif if (s && s > filename) { safe_php_register_variable(lbuf, s+1, NULL, 0 TSRMLS_CC); } else { -- 2.50.1