diff --git a/OLE/ChainedBlockStream.php b/OLE/ChainedBlockStream.php index 49bfcbb..88255b1 100644 --- a/OLE/ChainedBlockStream.php +++ b/OLE/ChainedBlockStream.php @@ -144,7 +144,9 @@ function stream_open($path, $mode, $options, &$openedPath) function stream_close() { $this->ole = null; - unset($GLOBALS['_OLE_INSTANCES']); + if (isset($GLOBALS)) { + unset($GLOBALS['_OLE_INSTANCES']); + } } /**