diff options
| author | Xinchen Hui <laruence@gmail.com> | 2014-04-14 23:40:21 +0800 |
|---|---|---|
| committer | Xinchen Hui <laruence@gmail.com> | 2014-04-14 23:40:21 +0800 |
| commit | 55440b0870130c9a5c2daaac0f984e5268d652af (patch) | |
| tree | d2b4c4c2bcf74109821ac0d6a8afee50b2fa4700 /ext/libxml/libxml.c | |
| parent | c7513f58d23b0e1d2ff6e097c8b2df6098c5213f (diff) | |
| download | php-git-55440b0870130c9a5c2daaac0f984e5268d652af.tar.gz | |
Fixed libxml handling default context
Diffstat (limited to 'ext/libxml/libxml.c')
| -rw-r--r-- | ext/libxml/libxml.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c index 10768942ae..c8eda85417 100644 --- a/ext/libxml/libxml.c +++ b/ext/libxml/libxml.c @@ -336,7 +336,7 @@ static void *php_libxml_streams_IO_open_wrapper(const char *filename, const char } } - context = php_stream_context_from_zval(&LIBXML(stream_context), 0); + context = php_stream_context_from_zval(ZVAL_IS_UNDEF(&LIBXML(stream_context))? NULL : &LIBXML(stream_context), 0); ret_val = php_stream_open_wrapper_ex(path_to_open, (char *)mode, REPORT_ERRORS, NULL, context); if (isescaped) { @@ -1050,13 +1050,13 @@ static PHP_FUNCTION(libxml_clear_errors) } /* }}} */ -PHP_LIBXML_API zend_bool php_libxml_disable_entity_loader(zend_bool disable TSRMLS_DC) +PHP_LIBXML_API zend_bool php_libxml_disable_entity_loader(zend_bool disable TSRMLS_DC) /* {{{ */ { zend_bool old = LIBXML(entity_loader_disabled); LIBXML(entity_loader_disabled) = disable; return old; -} +} /* }}} */ /* {{{ proto bool libxml_disable_entity_loader([boolean disable]) Disable/Enable ability to load external entities */ |
