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 */
|