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

Patch move-entity_loader_disabled-check for SimpleXML related Bug #62577

Patch version 2018-10-15 10:50 UTC

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

Developer: cmb@php.net

 ext/libxml/libxml.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c
index 589fc43442..9f325058ff 100644
--- a/ext/libxml/libxml.c
+++ b/ext/libxml/libxml.c
@@ -395,10 +395,6 @@ php_libxml_input_buffer_create_filename(const char *URI, xmlCharEncoding enc)
 	xmlParserInputBufferPtr ret;
 	void *context = NULL;
 
-	if (LIBXML(entity_loader_disabled)) {
-		return NULL;
-	}
-
 	if (URI == NULL)
 		return(NULL);
 
@@ -576,6 +572,10 @@ static xmlParserInputPtr _php_libxml_external_entity_loader(const char *URL,
 	int					status;
 	zend_fcall_info		*fci;
 
+	if (LIBXML(entity_loader_disabled)) {
+		return NULL;
+	}
+
 	fci = &LIBXML(entity_loader).fci;
 
 	if (fci->size == 0) {
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon Oct 14 05:01:26 2019 UTC