summaryrefslogtreecommitdiff
path: root/ext/soap/php_xml.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/soap/php_xml.c')
-rw-r--r--ext/soap/php_xml.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/ext/soap/php_xml.c b/ext/soap/php_xml.c
index 2e36751c26..c5dbd640de 100644
--- a/ext/soap/php_xml.c
+++ b/ext/soap/php_xml.c
@@ -80,16 +80,19 @@ xmlDocPtr soap_xmlParseFile(const char *filename TSRMLS_DC)
{
xmlParserCtxtPtr ctxt = NULL;
xmlDocPtr ret;
- zend_bool old_allow_url_fopen;
+ char *old_allow_url_fopen_list;
/*
xmlInitParser();
*/
- old_allow_url_fopen = PG(allow_url_fopen);
- zend_alter_ini_entry("allow_url_fopen", sizeof("allow_url_fopen"), "1", 1, PHP_INI_SYSTEM, PHP_INI_STAGE_RUNTIME);
+ old_allow_url_fopen_list = PG(allow_url_fopen_list);
+ if (!old_allow_url_fopen_list) {
+ old_allow_url_fopen_list = "";
+ }
+ zend_alter_ini_entry("allow_url_fopen", sizeof("allow_url_fopen"), "*", 1, PHP_INI_SYSTEM, PHP_INI_STAGE_RUNTIME);
ctxt = xmlCreateFileParserCtxt(filename);
- zend_alter_ini_entry("allow_url_fopen", sizeof("allow_url_fopen"), old_allow_url_fopen ? "1" : "0", 1, PHP_INI_SYSTEM, PHP_INI_STAGE_RUNTIME);
+ zend_alter_ini_entry("allow_url_fopen", sizeof("allow_url_fopen"), old_allow_url_fopen_list, strlen(old_allow_url_fopen_list), PHP_INI_SYSTEM, PHP_INI_STAGE_RUNTIME);
if (ctxt) {
ctxt->keepBlanks = 0;
ctxt->sax->ignorableWhitespace = soap_ignorableWhitespace;