summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/iconv/iconv.c12
-rw-r--r--ext/pdf/pdf.c1
2 files changed, 11 insertions, 2 deletions
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c
index b4fa53ddb2..8b68cd474f 100644
--- a/ext/iconv/iconv.c
+++ b/ext/iconv/iconv.c
@@ -18,10 +18,11 @@
*/
#include "php.h"
+#include "php_ini.h"
+#include "php_config.h"
#if HAVE_ICONV
-#include "php_ini.h"
#include "php_iconv.h"
#include "ext/standard/info.h"
@@ -76,10 +77,17 @@ PHP_INI_BEGIN()
STD_PHP_INI_ENTRY("iconv.internal_encoding", ICONV_INTERNAL_ENCODING, PHP_INI_ALL, OnUpdateString, internal_encoding, zend_iconv_globals, iconv_globals)
PHP_INI_END()
+static void
+php_iconv_init_globals(zend_iconv_globals *iconv_globals)
+{
+ iconv_globals->input_encoding = NULL;
+ iconv_globals->output_encoding = NULL;
+ iconv_globals->internal_encoding = NULL;
+}
PHP_MINIT_FUNCTION(iconv)
{
- ZEND_INIT_MODULE_GLOBALS(iconv, NULL, NULL);
+ ZEND_INIT_MODULE_GLOBALS(iconv, php_iconv_init_globals, NULL);
REGISTER_INI_ENTRIES();
return SUCCESS;
}
diff --git a/ext/pdf/pdf.c b/ext/pdf/pdf.c
index 71c1a582cd..5c03507f9a 100644
--- a/ext/pdf/pdf.c
+++ b/ext/pdf/pdf.c
@@ -27,6 +27,7 @@
#include "php.h"
#include "php_ini.h"
#include "php_globals.h"
+#include "php_config.h"
#include "ext/standard/head.h"
#include "ext/standard/info.h"
#include "ext/standard/file.h"