Skip to content

Commit

Permalink
Do not start session for Alert widget in case no session ID was passed
Browse files Browse the repository at this point in the history
  • Loading branch information
samdark committed Jul 7, 2020
1 parent 3b328a2 commit b408f28
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions common/widgets/Alert.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ class Alert extends \yii\bootstrap\Widget
public function run()
{
$session = Yii::$app->session;
if ($session->getHasSessionId() === false) {
return;
}
$flashes = $session->getAllFlashes();
$appendClass = isset($this->options['class']) ? ' ' . $this->options['class'] : '';

Expand Down

0 comments on commit b408f28

Please sign in to comment.