php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #54727
Patch php-patch-urlscanner-bug26862-correct-v2.diff revision 2011-05-13 12:03 UTC by mats dot lindh at gmail dot com
Patch php-patch-urlscanner-bug26862-correct.diff revision 2011-05-13 12:02 UTC by mats dot lindh at gmail dot com
Patch php-patch-urlscanner-bug26862.diff revision 2011-05-13 12:00 UTC by mats dot lindh at gmail dot com

Patch php-patch-urlscanner-bug26862-correct-v2.diff for Output Control Bug #54727

Patch version 2011-05-13 12:03 UTC

Return to Bug #54727 | Download this patch
This patch renders other patches obsolete

Obsolete patches:

Patch Revisions:

Developer: mats.lindh@gmail.com

Index: ext/standard/url_scanner_ex.c
===================================================================
--- ext/standard/url_scanner_ex.c	(revision 310987)
+++ ext/standard/url_scanner_ex.c	(working copy)
@@ -1012,7 +1012,8 @@
 			ctx->result.len = 0;
 			smart_str_free(&ctx->buf);
 		} else {
-			*handled_output = NULL;
+			*handled_output = estrdup(output);
+			*handled_output_len = output_len;
 		}
 	} else {
 		*handled_output = NULL;
Index: ext/session/tests/bug26862.phpt
===================================================================
--- ext/session/tests/bug26862.phpt	(revision 310987)
+++ ext/session/tests/bug26862.phpt	(working copy)
@@ -11,12 +11,12 @@
 session_start();
 output_add_rewrite_var('var', 'value');
 
-echo '<a href="file.php">link</a>';
+echo '<a href="file-first.php">link</a>';
 
 ob_flush();
 
 output_reset_rewrite_vars();
-echo '<a href="file.php">link</a>';
+echo '<a href="file-second.php">link</a>';
 ?>
 --EXPECT--
-<a href="file.php?var=value">link</a><a href="file.php">link</a>
+<a href="file-first.php?var=value">link</a><a href="file-second.php">link</a>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 05 02:01:30 2024 UTC