php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch gmagick-bug78465.patch for gmagick Bug #78465

Patch version 2020-02-19 10:17 UTC

Return to Bug #78465 | Download this patch
Patch Revisions:

Developer: remi@php.net

Workaround to https://bugs.php.net/78465


diff -up ./gmagick.c.old ./gmagick.c
--- ./gmagick.c.old	2020-02-19 11:10:43.388127352 +0100
+++ ./gmagick.c	2020-02-19 11:10:48.691101111 +0100
@@ -1742,6 +1742,13 @@ PHP_MINFO_FUNCTION(gmagick)
 	php_info_print_table_end();
 }
 
+/* {{{ PHP_MINFO_FUNCTION(gmagick)
+*/
+PHP_RINIT_FUNCTION(gmagick)
+{
+	MagickSetResourceLimit(ThreadsResource, 1);
+}
+
 /* {{{ zend_module_entry gmagick_module_entry
 */
 zend_module_entry gmagick_module_entry =
@@ -1751,7 +1758,7 @@ zend_module_entry gmagick_module_entry =
 	php_gmagick_functions,		/* Functions */
 	PHP_MINIT(gmagick),		/* MINIT */
 	PHP_MSHUTDOWN(gmagick),		/* MSHUTDOWN */
-	NULL,				/* RINIT */
+	PHP_RINIT(gmagick),				/* RINIT */
 	NULL,				/* RSHUTDOWN */
 	PHP_MINFO(gmagick),		/* MINFO */
 	PHP_GMAGICK_VERSION,		/* Version */
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 14 23:01:26 2024 UTC