Commit 36184569 by Carsten Brandt

removed unnecessary check

parent 5ed52b98
...@@ -88,14 +88,9 @@ class Application extends \yii\base\Application ...@@ -88,14 +88,9 @@ class Application extends \yii\base\Application
* Handles the specified request. * Handles the specified request.
* @param Request $request the request to be handled * @param Request $request the request to be handled
* @return Response the resulting response * @return Response the resulting response
* @throws Exception when script is not running on command line.
* @throws Exception if the route is invalid
*/ */
public function handleRequest($request) public function handleRequest($request)
{ {
if (!$request->getIsConsoleRequest()) {
throw new Exception(\Yii::t('yii', 'This script must be run from the command line.'));
}
list ($route, $params) = $request->resolve(); list ($route, $params) = $request->resolve();
$result = $this->runAction($route, $params); $result = $this->runAction($route, $params);
if ($result instanceof Response) { if ($result instanceof Response) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment