php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #60468
Patch handle-empty-string revision 2011-12-26 08:32 UTC by me at ktamura dot com

Patch handle-empty-string for Output Control Bug #60468

Patch version 2011-12-26 08:32 UTC

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

Developer: me@ktamura.com

Index: main/output.c
===================================================================
--- main/output.c	(revision 321384)
+++ main/output.c	(working copy)
@@ -900,12 +900,10 @@
 				status = PHP_OUTPUT_HANDLER_NO_DATA;
 				if (Z_TYPE_P(retval) != IS_BOOL) {
 					convert_to_string_ex(&retval);
-					if (Z_STRLEN_P(retval)) {
-						context->out.data = estrndup(Z_STRVAL_P(retval), Z_STRLEN_P(retval));
-						context->out.used = Z_STRLEN_P(retval);
-						context->out.free = 1;
-						status = PHP_OUTPUT_HANDLER_SUCCESS;
-					}
+					context->out.data = estrndup(Z_STRVAL_P(retval), Z_STRLEN_P(retval));
+					context->out.used = Z_STRLEN_P(retval);
+					context->out.free = 1;
+					status = PHP_OUTPUT_HANDLER_SUCCESS;
 				}
 			} else {
 				/* call failed, pass internal buffer along */
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 07 15:01:36 2024 UTC