tony2001 Thu Apr 28 10:20:28 2005 EDT Modified files: /php-src/main output.c Log: fix #32828 (Throwing exception in output_callback function with ob_start and ob_end_clean leads to segfault) http://cvs.php.net/diff.php/php-src/main/output.c?r1=1.165&r2=1.166&ty=u Index: php-src/main/output.c diff -u php-src/main/output.c:1.165 php-src/main/output.c:1.166 --- php-src/main/output.c:1.165 Wed Oct 20 11:31:06 2004 +++ php-src/main/output.c Thu Apr 28 10:20:28 2005 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: output.c,v 1.165 2004/10/20 15:31:06 stas Exp $ */ +/* $Id: output.c,v 1.166 2005/04/28 14:20:28 tony2001 Exp $ */ #include "php.h" #include "ext/standard/head.h" @@ -238,7 +238,7 @@ OG(ob_lock) = 1; if (call_user_function_ex(CG(function_table), NULL, OG(active_ob_buffer).output_handler, &alternate_buffer, 2, params, 1, NULL TSRMLS_CC)==SUCCESS) { - if (!(Z_TYPE_P(alternate_buffer)==IS_BOOL && Z_BVAL_P(alternate_buffer)==0)) { + if (alternate_buffer && !(Z_TYPE_P(alternate_buffer)==IS_BOOL && Z_BVAL_P(alternate_buffer)==0)) { convert_to_string_ex(&alternate_buffer); final_buffer = Z_STRVAL_P(alternate_buffer); final_buffer_length = Z_STRLEN_P(alternate_buffer);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php