We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5934f8e + 8351b6b commit 0e33d34Copy full SHA for 0e33d34
src/Codeception/Module/Yii2.php
@@ -886,13 +886,13 @@ public function _initializeSession()
886
public function _backupSession()
887
{
888
if (isset(Yii::$app) && Yii::$app->session->useCustomStorage) {
889
- throw new ModuleException("Yii2 MultiSession only supports the default session backend.");
+ throw new ModuleException($this, "Yii2 MultiSession only supports the default session backend.");
890
}
891
return [
892
'clientContext' => $this->client->getContext(),
893
'headers' => $this->headers,
894
- 'cookie' => $_COOKIE,
895
- 'session' => $_SESSION,
+ 'cookie' => isset($_COOKIE) ? $_COOKIE : [],
+ 'session' => isset($_SESSION) ? $_SESSION : [],
896
];
897
898
0 commit comments