diff options
author | Moriyoshi Koizumi <moriyoshi@php.net> | 2003-05-16 23:08:23 +0000 |
---|---|---|
committer | Moriyoshi Koizumi <moriyoshi@php.net> | 2003-05-16 23:08:23 +0000 |
commit | f3b050fba15cd7f602faf02ee9443f2eb7680748 (patch) | |
tree | 5f078f93fb92e5449f4db338a99d99dc0e4c33eb /sapi/apache | |
parent | 528c495d688a3e06f0f7e2a5522c81baf851c620 (diff) | |
download | php-git-f3b050fba15cd7f602faf02ee9443f2eb7680748.tar.gz |
Fixed a syntax highlighter problem that happens when output buffering is turned
on
Diffstat (limited to 'sapi/apache')
-rw-r--r-- | sapi/apache/sapi_apache.c | 9 |
1 files 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; } /* }}} */ |