php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch fix-upload-win-mqgpc-bug-55510.patch for Filesystem function related Bug #55510

Patch version 2011-08-29 02:43 UTC

Return to Bug #55510 | Download this patch
Patch Revisions:

Developer: arpad@php.net

Index: main/rfc1867.c
===================================================================
--- main/rfc1867.c	(revision 315664)
+++ main/rfc1867.c	(working copy)
@@ -1210,11 +1210,12 @@
 			}
 #ifdef PHP_WIN32
 			if (PG(magic_quotes_gpc)) {
-				s = s ? s : filename;
-				tmp = strrchr(s, '\'');
-				s = tmp > s ? tmp : s;
-				tmp = strrchr(s, '"');
-				s = tmp > s ? tmp : s;
+				if ((tmp = strrchr(s ? s : filename, '\'')) > s) {
+					s = tmp;
+				}
+				if ((tmp = strrchr(s ? s : filename, '"')) > s) {
+					s = tmp;
+				}
 			}
 #endif
 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 03:01:28 2024 UTC