Explorar o código

Update Select.php

walkor %!s(int64=10) %!d(string=hai) anos
pai
achega
7e5c142a9f
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      Events/Select.php

+ 2 - 2
Events/Select.php

@@ -90,7 +90,7 @@ class Select implements EventInterface
      * 添加事件及处理函数
      * @see Events\EventInterface::add()
      */
-    public function add($fd, $flag, $func, $args = null)
+    public function add($fd, $flag, $func, $args = array())
     {
         switch ($flag)
         {
@@ -114,7 +114,7 @@ class Select implements EventInterface
                 // $fd 为 定时的时间间隔,单位为秒,支持小数,能精确到0.001秒
                 $run_time = microtime(true)+$fd;
                 $this->_scheduler->insert($this->_timerId, -$run_time);
-                $this->_task[$this->_timerId] = array($func, $args, $flag, $fd);
+                $this->_task[$this->_timerId] = array($func, (array)$args, $flag, $fd);
                 $this->tick();
                 return $this->_timerId++;
         }