php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #51627
Patch fopen_wrappers.c.diff revision 2010-04-21 21:29 UTC by russell dot tempero at rightnow dot com

Patch fopen_wrappers.c.diff for CGI/CLI related Bug #51627

Patch version 2010-04-21 21:29 UTC

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

Developer: russell.tempero@rightnow.com

Index: main/fopen_wrappers.c
===================================================================
RCS file: /nfs/users/apiutil/rtempero/local/repositories/cvsroot/php-5.3.2/main/fopen_wrappers.c,v
retrieving revision 1.2
diff -u -p -r1.2 fopen_wrappers.c
--- main/fopen_wrappers.c	16 Apr 2010 17:24:51 -0000	1.2
+++ main/fopen_wrappers.c	21 Apr 2010 21:18:53 -0000
@@ -435,8 +435,8 @@ PHPAPI int php_fopen_primary_script(zend
 		}
 	} else
 #endif
-	if (PG(doc_root) && path_info && (length = strlen(PG(doc_root)) &&
-		IS_ABSOLUTE_PATH(PG(doc_root), length))) {
+	if (PG(doc_root) && path_info && (length = strlen(PG(doc_root))) &&
+		IS_ABSOLUTE_PATH(PG(doc_root), length)) {
 		filename = emalloc(length + strlen(path_info) + 2);
 		if (filename) {
 			memcpy(filename, PG(doc_root), length);
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 18:01:29 2024 UTC