mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-03 05:48:11 +08:00
Fixed inconsistent return of \yii\console\Application::runAction()
This commit is contained in:
@ -138,7 +138,7 @@ class Application extends \yii\base\Application
|
||||
return $result;
|
||||
} else {
|
||||
$response = $this->getResponse();
|
||||
$response->exitStatus = (int) $result;
|
||||
$response->exitStatus = $result;
|
||||
|
||||
return $response;
|
||||
}
|
||||
@ -157,7 +157,7 @@ class Application extends \yii\base\Application
|
||||
public function runAction($route, $params = [])
|
||||
{
|
||||
try {
|
||||
return parent::runAction($route, $params);
|
||||
return (int)parent::runAction($route, $params);
|
||||
} catch (InvalidRouteException $e) {
|
||||
throw new Exception(Yii::t('yii', 'Unknown command "{command}".', ['command' => $route]), 0, $e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user