- Fixed PECL bug #11216 (crash in ZipArchive::addEmptyDir when a directory
already exists). (Pierre)
-- Fixed bug #41765 (Recode crashes/does not work on amd64)
+- Fixed bug #41773 (php_strip_whitespace() sends headers with errors
+ suppressed). (Tony)
+- Fixed bug #41765 (Recode crashes/does not work on amd64).
(nexus at smoula dot net, Stas)
- Fixed bug #41724 (libxml_get_last_error() - errors service request scope).
(thekid at php dot net, Ilia)
if (highlight_file(filename, &syntax_highlighter_ini TSRMLS_CC) == FAILURE) {
if (i) {
- php_end_ob_buffer (1, 0 TSRMLS_CC);
+ int res = php_ob_get_buffer(return_value TSRMLS_CC);
+
+ /* flush the buffer only if there is something to flush */
+ if (res == SUCCESS && Z_STRLEN_P(return_value) > 0) {
+ php_end_ob_buffer (1, 0 TSRMLS_CC);
+ zval_dtor(return_value);
+ } else {
+ php_end_ob_buffer (0, 0 TSRMLS_CC);
+ if (res == SUCCESS) {
+ zval_dtor(return_value);
+ }
+ }
}
RETURN_FALSE;
}
RETURN_FALSE;
}
- php_start_ob_buffer(NULL, 0, 1 TSRMLS_CC);
-
file_handle.type = ZEND_HANDLE_FILENAME;
file_handle.filename = filename;
file_handle.free_filename = 0;
zend_save_lexical_state(&original_lex_state TSRMLS_CC);
if (open_file_for_scanning(&file_handle TSRMLS_CC)==FAILURE) {
zend_restore_lexical_state(&original_lex_state TSRMLS_CC);
- php_end_ob_buffer(1, 0 TSRMLS_CC);
RETURN_EMPTY_STRING();
}
+ php_start_ob_buffer(NULL, 0, 1 TSRMLS_CC);
+
zend_strip(TSRMLS_C);
zend_destroy_file_handle(&file_handle TSRMLS_CC);