From f3b050fba15cd7f602faf02ee9443f2eb7680748 Mon Sep 17 00:00:00 2001 From: Moriyoshi Koizumi Date: Fri, 16 May 2003 23:08:23 +0000 Subject: [PATCH] Fixed a syntax highlighter problem that happens when output buffering is turned on --- sapi/apache/sapi_apache.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sapi/apache/sapi_apache.c b/sapi/apache/sapi_apache.c index 45fa8a90d5..da024c6200 100644 --- a/sapi/apache/sapi_apache.c +++ b/sapi/apache/sapi_apache.c @@ -27,6 +27,7 @@ */ int apache_php_module_main(request_rec *r, int display_source_mode TSRMLS_DC) { + int retval = OK; zend_file_handle file_handle; if (php_request_startup(TSRMLS_C) == FAILURE) { @@ -40,10 +41,8 @@ int apache_php_module_main(request_rec *r, int display_source_mode TSRMLS_DC) zend_syntax_highlighter_ini syntax_highlighter_ini; php_get_highlight_struct(&syntax_highlighter_ini); - if (highlight_file(SG(request_info).path_translated, &syntax_highlighter_ini TSRMLS_CC)){ - return OK; - } else { - return NOT_FOUND; + if (highlight_file(SG(request_info).path_translated, &syntax_highlighter_ini TSRMLS_CC) != SUCCESS) { + retval = NOT_FOUND; } } else { file_handle.type = ZEND_HANDLE_FILENAME; @@ -61,7 +60,7 @@ int apache_php_module_main(request_rec *r, int display_source_mode TSRMLS_DC) php_request_shutdown(NULL); } zend_end_try(); - return (OK); + return retval; } /* }}} */ -- 2.40.0