mirror of
https://github.com/php/php-src.git
synced 2024-11-28 12:26:37 +08:00
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4: Fix #77594: ob_tidyhandler is never reset
This commit is contained in:
commit
9b1c02c2df
3
NEWS
3
NEWS
@ -7,6 +7,9 @@ PHP NEWS
|
||||
(cmb)
|
||||
. Fixed bug #72964 (White space not unfolded for CC/Bcc headers). (cmb)
|
||||
|
||||
- Tidy:
|
||||
. Fixed bug #77594 (ob_tidyhandler is never reset). (cmb)
|
||||
|
||||
26 Nov 2020, PHP 8.0.0
|
||||
|
||||
- BZ2:
|
||||
|
15
ext/tidy/tests/bug77594.phpt
Normal file
15
ext/tidy/tests/bug77594.phpt
Normal file
@ -0,0 +1,15 @@
|
||||
--TEST--
|
||||
Bug #77594 (ob_tidyhandler is never reset)
|
||||
--DESCRIPTION--
|
||||
Test is useful only with --repeat 2 (or more)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('tidy')) die('skip tidy extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
ob_start('ob_tidyhandler');
|
||||
var_dump(ob_end_clean());
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(true)
|
@ -228,6 +228,7 @@ static int php_tidy_output_handler(void **nothing, php_output_context *output_co
|
||||
static PHP_MINIT_FUNCTION(tidy);
|
||||
static PHP_MSHUTDOWN_FUNCTION(tidy);
|
||||
static PHP_RINIT_FUNCTION(tidy);
|
||||
static PHP_RSHUTDOWN_FUNCTION(tidy);
|
||||
static PHP_MINFO_FUNCTION(tidy);
|
||||
|
||||
ZEND_DECLARE_MODULE_GLOBALS(tidy)
|
||||
@ -249,7 +250,7 @@ zend_module_entry tidy_module_entry = {
|
||||
PHP_MINIT(tidy),
|
||||
PHP_MSHUTDOWN(tidy),
|
||||
PHP_RINIT(tidy),
|
||||
NULL,
|
||||
PHP_RSHUTDOWN(tidy),
|
||||
PHP_MINFO(tidy),
|
||||
PHP_TIDY_VERSION,
|
||||
PHP_MODULE_GLOBALS(tidy),
|
||||
@ -863,6 +864,13 @@ static PHP_RINIT_FUNCTION(tidy)
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
static PHP_RSHUTDOWN_FUNCTION(tidy)
|
||||
{
|
||||
TG(clean_output) = INI_ORIG_BOOL("tidy.clean_output");
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
static PHP_MSHUTDOWN_FUNCTION(tidy)
|
||||
{
|
||||
UNREGISTER_INI_ENTRIES();
|
||||
|
Loading…
Reference in New Issue
Block a user