Yii Framework Forum: qiang哥进来看下,这个是不是一个Bug - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

qiang哥进来看下,这个是不是一个Bug Rate Topic: -----

#1 User is offline   punkwang 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 52
  • Joined: 05-July 09

Posted 02 January 2016 - 11:43 AM

Yii2 2.0.5


className yii\base\Module

447行 runAction方法

$parts = $this->createController($route);
if (is_array($parts)) {
/* @var $controller Controller */
list($controller, $actionID) = $parts;
$oldController = Yii::$app->controller;
Yii::$app->controller = $controller;
$result = $controller->runAction($actionID, $params);
Yii::$app->controller = $oldController; //////////////如果这里的oldController 是NULL 在个别事件中调用controller 或者依赖方法 会报controller空异常

return $result;
} else {
$id = $this->getUniqueId();
throw new InvalidRouteException('Unable to resolve the request "' . ($id === '' ? $route : $id . '/' . $route) . '".');
}


请qiang哥 看下 是不是一个问题 比如我在 Response::EVENT_AFTER_SEND 调用 Url::to 就会报错!!
qq:27612285
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users