Possible ob_get_clean() failure

Created on 16 December 2017, about 7 years ago
Updated 15 January 2025, 5 days ago

Under certain conditions, minifyhtml fails to get and drop the output buffer and may output garbage. Error is logged:

Notice : ob_get_clean(): failed to delete buffer of zlib output compression (1) dans minifyhtml_exit() (ligne 38 dans .../minifyhtml/minifyhtml.module).

To reproduce, set zlib.output_compression = On in php.ini, enable html minification, install and configure module xmlsitemap and browse to the sitemap URL. The result is the log above and a corrupt XML output.

The attached patch fixes it by giving up with minification if some buffer error occurs.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024