]> granicus.if.org Git - php/commitdiff
*** empty log message ***
authorRui Hirokawa <hirokawa@php.net>
Tue, 2 Jul 2002 15:28:14 +0000 (15:28 +0000)
committerRui Hirokawa <hirokawa@php.net>
Tue, 2 Jul 2002 15:28:14 +0000 (15:28 +0000)
main/rfc1867.c

index 549ffa4d768a8202b053fc1c88a3a16575e8a240..2f7d31bb0f07f7ae7e9e8b2cd50131d5718ff213 100644 (file)
@@ -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 {