summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo André dos Santos Lopes <cataphract@php.net>2012-06-09 16:32:18 (GMT)
committerGustavo André dos Santos Lopes <cataphract@php.net>2012-06-09 16:32:18 (GMT)
commit76a26d841900ff602ad6f9450939aff55a62b5a9 (patch)
tree82af90f616fcb07914091571c89e46bdc5d493bc
parent0d85a86bbb151537a2362f17224d076556252ada (diff)
parent503358c1797e0f7b05fb49f22dd44bc7f517069f (diff)
downloadphp-76a26d841900ff602ad6f9450939aff55a62b5a9.tar.gz
Merge branch '5.4'
* 5.4: Fix bug #62266 rearrange news typo NEWS File
-rw-r--r--ext/libxml/libxml.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c
index e42d845..a39c875 100644
--- a/ext/libxml/libxml.c
+++ b/ext/libxml/libxml.c
@@ -677,9 +677,18 @@ is_string:
static xmlParserInputPtr _php_libxml_pre_ext_ent_loader(const char *URL,
const char *ID, xmlParserCtxtPtr context)
{
+ TSRMLS_FETCH();
+
/* Check whether we're running in a PHP context, since the entity loader
- * we've defined is an application level (true global) setting */
- if (xmlGenericError == php_libxml_error_handler) {
+ * we've defined is an application level (true global) setting.
+ * If we are, we also want to check whether we've finished activating
+ * the modules (RINIT phase). Using our external entity loader during a
+ * RINIT should not be problem per se (though during MINIT it is, because
+ * we don't even have a resource list by then), but then whether one
+ * extension would be using the custom external entity loader or not
+ * could depend on extension loading order
+ * (if _php_libxml_per_request_initialization */
+ if (xmlGenericError == php_libxml_error_handler && PG(modules_activated)) {
return _php_libxml_external_entity_loader(URL, ID, context);
} else {
return _php_libxml_default_entity_loader(URL, ID, context);