Skip to content

Commit

Permalink
Prevent initialization of front controller when constructing session …
Browse files Browse the repository at this point in the history
…model.

Refs #166
  • Loading branch information
colinmollenhour authored Jul 1, 2019
1 parent 5b8074a commit 471e9af
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/code/local/Cm/RedisSession/Model/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ public function __construct()
$this->sessionHandler = new \Cm\RedisSession\Handler(
new Cm_RedisSession_Model_Session_Config(),
new Cm_RedisSession_Model_Session_Logger(),
Mage::app()->getFrontController()->getAction() && Mage::app()->getFrontController()->getAction()->getFlag('', self::FLAG_READ_ONLY) ?: false
Mage::registry('controller')
&& Mage::app()->getFrontController()->getAction()
&& Mage::app()->getFrontController()->getAction()->getFlag('', self::FLAG_READ_ONLY)
);
} catch (\Cm\RedisSession\ConnectionFailedException $e) {
$this->handleException($e);
Expand Down

0 comments on commit 471e9af

Please sign in to comment.