From 3bb1398e31d8a74d78dde94751a34295dc5fe633 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Wed, 22 Jun 2022 23:57:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EventDispatch.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/EventDispatch.php b/EventDispatch.php index 9e3e3c0..0d05985 100644 --- a/EventDispatch.php +++ b/EventDispatch.php @@ -38,6 +38,9 @@ class EventDispatch extends Component implements EventDispatcherInterface { /** @var \SplPriorityQueue $lists */ $lists = $this->eventProvider->getListenersForEvent($event); + if (!$lists->valid()) { + return $event; + } $lists->top(); while ($lists->valid()) { try {