diff options
| author | Antony Dovgal <tony2001@php.net> | 2008-07-11 12:44:02 +0000 |
|---|---|---|
| committer | Antony Dovgal <tony2001@php.net> | 2008-07-11 12:44:02 +0000 |
| commit | 04c8373b6a1fcde7b8ec340695f53469bf55dfae (patch) | |
| tree | ba3813e5599851a0be4a620b2b02215a2759d636 | |
| parent | 8ea5ae6c9ab886ed81c09ee98a85fd2fd7d2dc83 (diff) | |
| download | php-git-04c8373b6a1fcde7b8ec340695f53469bf55dfae.tar.gz | |
MFH
| -rw-r--r-- | ext/reflection/tests/reflectionExtension_getDependencies_basic.phpt | 4 | ||||
| -rwxr-xr-x | main/streams/streams.c | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/ext/reflection/tests/reflectionExtension_getDependencies_basic.phpt b/ext/reflection/tests/reflectionExtension_getDependencies_basic.phpt index fff5c746f8..8b5293a48f 100644 --- a/ext/reflection/tests/reflectionExtension_getDependencies_basic.phpt +++ b/ext/reflection/tests/reflectionExtension_getDependencies_basic.phpt @@ -2,6 +2,10 @@ 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'); diff --git a/main/streams/streams.c b/main/streams/streams.c index 14bbcd2657..118c537648 100755 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -1806,8 +1806,9 @@ PHPAPI php_stream *_php_stream_open_wrapper_ex(char *path, char *mode, int optio 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 |
