Jelajahi Sumber

Update Swoole

Joanhey 6 tahun lalu
induk
melakukan
4f326c2e5c
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      Events/Swoole.php

+ 2 - 2
Events/Swoole.php

@@ -57,7 +57,7 @@ class Swoole implements EventInterface
             case self::EV_TIMER:
             case self::EV_TIMER_ONCE:
                 $method = self::EV_TIMER === $flag ? 'tick' : 'after';
-                if ($this->mapId > PHP_INT_MAX) {
+                if ($this->mapId > \PHP_INT_MAX) {
                     $this->mapId = 0;
                 }
                 $mapId = $this->mapId++;
@@ -67,7 +67,7 @@ class Swoole implements EventInterface
                         // EV_TIMER_ONCE
                         if (! isset($timer_id)) {
                             // may be deleted in $func
-                            if (array_key_exists($mapId, $this->_timerOnceMap)) {
+                            if (\array_key_exists($mapId, $this->_timerOnceMap)) {
                                 $timer_id = $this->_timerOnceMap[$mapId];
                                 unset($this->_timer[$timer_id],
                                     $this->_timerOnceMap[$mapId]);