ReflectionExtension::getDependencies() method on an extension with a required and conflicting dependency
--CREDITS--
Felix De Vliegher <felix.devliegher@gmail.com>
+--SKIPIF--
+<?php
+if (!extension_loaded("dom")) die("skip no dom extension");
+?>
--FILE--
<?php
$dom = new ReflectionExtension('dom');
opened_path, context STREAMS_REL_CC TSRMLS_CC);
}
- if (context) {
- zend_list_addref(context->rsrc_id);
+ /* increase context refcount only if the context is really used */
+ if (stream && stream->context) {
+ zend_list_addref(stream->context->rsrc_id);
}
/* if the caller asked for a persistent stream but the wrapper did not