diff --git a/src/danog/MadelineProto/Server/Stream.php b/src/danog/MadelineProto/Server/Stream.php index a9baca3d..595c5063 100644 --- a/src/danog/MadelineProto/Server/Stream.php +++ b/src/danog/MadelineProto/Server/Stream.php @@ -38,7 +38,7 @@ class Stream $opt = stream_context_get_options($this->context); if (!is_array($opt[self::WRAPPER_NAME]) || !isset($opt[self::WRAPPER_NAME]['handler']) || - !($opt[self::WRAPPER_NAME]['handler'] instanceof Handler) + !($opt[self::WRAPPER_NAME]['handler'] instanceof Handler) || !isset($opt[self::WRAPPER_NAME]['stream_id']) || !is_integer($opt[self::WRAPPER_NAME]['stream_id'])) return false; $this->_handler = $opt[self::WRAPPER_NAME]['handler']; @@ -54,4 +54,4 @@ class Stream public function stream_lock($mode) { } -} \ No newline at end of file +}