Commit 2f0362e2b1a for php.net
commit 2f0362e2b1af0ec978857dd7180374e7de2a9624
Merge: 2311816c9ef c36758eefbc
Author: Shivam Mathur <shivam_jpr@hotmail.com>
Date: Sun Sep 13 23:30:15 2026 +0530
Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
Avoid closing libxml output encoder twice (#23678)
diff --cc ext/libxml/libxml.c
index 0105106d953,c73bcf930cf..1fe51a2fbe8
--- a/ext/libxml/libxml.c
+++ b/ext/libxml/libxml.c
@@@ -619,11 -615,13 +619,13 @@@ php_libxml_output_buffer_create_filenam
goto err;
}
- return(ret);
+ return ret;
err:
- /* Similarly to __xmlOutputBufferCreateFilename we should also close the encoder on failure. */
+ #if LIBXML_VERSION < 21404
+ /* As of libxml 2.14.4, libxml closes the encoder after this callback fails. */
xmlCharEncCloseFunc(encoder);
+ #endif
return NULL;
}