Users can shoot themselves by their own output handler always.

Therefore, this check is overkill and it should be documented
limitation, IMO.

Anyway, a little optimization.
This commit is contained in:
Yasuo Ohgaki 2002-09-30 23:46:43 +00:00
parent 6477b0b5d8
commit ecf146cbce

View file

@ -388,6 +388,7 @@ static int php_ob_init_named(uint initial_size, uint block_size, char *handler_n
{
int handler_gz, handler_mb, handler_ic;
if (OG(ob_nesting_level>1)) {
/* check for specific handlers where rules apply */
handler_gz = strcmp(handler_name, "ob_gzhandler");
handler_mb = strcmp(handler_name, "mb_output_handler");
@ -405,6 +406,8 @@ static int php_ob_init_named(uint initial_size, uint block_size, char *handler_n
if (!handler_ic && php_ob_init_conflict(handler_name, "mb_output_handler" TSRMLS_CC))
return FAILURE;
}
}
if (OG(ob_nesting_level)>0) {
if (OG(ob_nesting_level)==1) { /* initialize stack */
zend_stack_init(&OG(ob_buffers));