mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
Allow just set or get context passing NULL pointers
This commit is contained in:
parent
281663f75d
commit
04456f8fab
@ -765,8 +765,12 @@ PHP_LIBXML_API void php_libxml_shutdown(void)
|
||||
|
||||
PHP_LIBXML_API void php_libxml_switch_context(zval *context, zval *oldcontext TSRMLS_DC)
|
||||
{
|
||||
ZVAL_COPY_VALUE(oldcontext, &LIBXML(stream_context));
|
||||
ZVAL_COPY_VALUE(&LIBXML(stream_context), context);
|
||||
if (oldcontext) {
|
||||
ZVAL_COPY_VALUE(oldcontext, &LIBXML(stream_context));
|
||||
}
|
||||
if (context) {
|
||||
ZVAL_COPY_VALUE(&LIBXML(stream_context), context);
|
||||
}
|
||||
}
|
||||
|
||||
static PHP_MINIT_FUNCTION(libxml)
|
||||
|
Loading…
Reference in New Issue
Block a user