--- PHP_5_3/ext/libxml/libxml.c 2011/04/09 16:59:36 310108 +++ PHP_5_3/ext/libxml/libxml.c 2011/04/09 18:32:55 310109 @@ -310,9 +310,7 @@ } } - if (LIBXML(stream_context)) { - context = zend_fetch_resource(&LIBXML(stream_context) TSRMLS_CC, -1, "Stream-Context", NULL, 1, php_le_stream_context()); - } + context = php_stream_context_from_zval(LIBXML(stream_context), 0); ret_val = php_stream_open_wrapper_ex(path_to_open, (char *)mode, ENFORCE_SAFE_MODE|REPORT_ERRORS, NULL, context); if (isescaped) {