--- embedaddon/php/main/output.c 2012/05/29 12:34:35 1.1.1.2 +++ embedaddon/php/main/output.c 2013/07/22 01:32:11 1.1.1.3 @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2012 The PHP Group | + | Copyright (c) 1997-2013 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: output.c,v 1.1.1.2 2012/05/29 12:34:35 misho Exp $ */ +/* $Id: output.c,v 1.1.1.3 2013/07/22 01:32:11 misho Exp $ */ #ifndef PHP_OUTPUT_DEBUG # define PHP_OUTPUT_DEBUG 0 @@ -214,7 +214,7 @@ PHPAPI void php_output_register_constants(TSRMLS_D) * Used by SAPIs to disable output */ PHPAPI void php_output_set_status(int status TSRMLS_DC) { - OG(flags) = status & 0xf; + OG(flags) = (OG(flags) & ~0xf) | (status & 0xf); } /* }}} */ @@ -297,7 +297,6 @@ PHPAPI int php_output_clean(TSRMLS_D) php_output_context context; if (OG(active) && (OG(active)->flags & PHP_OUTPUT_HANDLER_CLEANABLE)) { - OG(active)->buffer.used = 0; php_output_context_init(&context, PHP_OUTPUT_HANDLER_CLEAN TSRMLS_CC); php_output_handler_op(OG(active), &context); php_output_context_dtor(&context); @@ -1025,6 +1024,7 @@ static inline php_output_handler_status_t php_output_h case PHP_OUTPUT_HANDLER_SUCCESS: /* no more buffered data */ handler->buffer.used = 0; + handler->flags |= PHP_OUTPUT_HANDLER_PROCESSED; break; } @@ -1225,7 +1225,6 @@ static inline int php_output_stack_pop(int flags TSRML /* signal that we're cleaning up */ if (flags & PHP_OUTPUT_POP_DISCARD) { context.op |= PHP_OUTPUT_HANDLER_CLEAN; - orphan->buffer.used = 0; } php_output_handler_op(orphan, &context); }