aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2017-11-08 15:12:27 +0100
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2017-11-08 15:12:27 +0100
commit0d3ee182be0210824057dc29b8656596b190f9b6 (patch)
tree67e4294b79fa7e9e8eb52ed0f3a557bb25317374
parentc862614a1b9f6d53c13bc12d51528258ed3a0596 (diff)
downloadStream-0d3ee182be0210824057dc29b8656596b190f9b6.zip
Stream-0d3ee182be0210824057dc29b8656596b190f9b6.tar.gz
Stream-0d3ee182be0210824057dc29b8656596b190f9b6.tar.bz2
chore(php) Fix type.
-rw-r--r--Source/Stream.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/Stream.php b/Source/Stream.php
index dc9f4f3..da686d1 100644
--- a/Source/Stream.php
+++ b/Source/Stream.php
@@ -259,7 +259,12 @@ abstract class Stream implements IStream\Stream, Event\Listenable
final public function close()
{
$streamName = $this->getStreamName();
- $name = md5($streamName);
+
+ if (null === $streamName) {
+ return;
+ }
+
+ $name = md5($streamName);
if (!isset(self::$_register[$name])) {
return;