Skip to content

Commit 54ef972

Browse files
SamMousasamdark
authored andcommitted
Fixed an issue with exit exceptions (#4923)
* Fixed an issue where exceptions in the Yii app resulted in exceptions in the Yii module * Fix test skipping * Fix syntax error * Update comments
1 parent f1ef963 commit 54ef972

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Codeception/Lib/Connector/Yii2.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,13 +184,12 @@ public function doRequest($request)
184184
// to expect error response codes in tests.
185185
$app->errorHandler->discardExistingOutput = false;
186186
$app->errorHandler->handleException($e);
187-
$response = $app->response;
188-
189187
} elseif (!$e instanceof ExitException) {
190188
// for exceptions not related to Http, we pass them to Codeception
191189
$this->resetApplication();
192190
throw $e;
193191
}
192+
$response = $app->response;
194193
}
195194

196195
$this->encodeCookies($response, $yiiRequest, $app->security);

0 commit comments

Comments
 (0)