Skip to content
Snippets Groups Projects
Commit 073e1f73 authored by Demian Katz's avatar Demian Katz
Browse files

Avoid writes to immutable sessions.

parent feac0aa5
No related merge requests found
...@@ -426,7 +426,10 @@ abstract class Options implements ServiceLocatorAwareInterface ...@@ -426,7 +426,10 @@ abstract class Options implements ServiceLocatorAwareInterface
*/ */
public function rememberLastSort($last) public function rememberLastSort($last)
{ {
$this->getSession()->lastSort = $last; $session = $this->getSession();
if (!$session->getManager()->getStorage()->isImmutable()) {
$session->lastSort = $last;
}
} }
/** /**
...@@ -449,7 +452,10 @@ abstract class Options implements ServiceLocatorAwareInterface ...@@ -449,7 +452,10 @@ abstract class Options implements ServiceLocatorAwareInterface
*/ */
public function rememberLastLimit($last) public function rememberLastLimit($last)
{ {
$this->getSession()->lastLimit = $last; $session = $this->getSession();
if (!$session->getManager()->getStorage()->isImmutable()) {
$session->lastLimit = $last;
}
} }
/** /**
...@@ -472,7 +478,10 @@ abstract class Options implements ServiceLocatorAwareInterface ...@@ -472,7 +478,10 @@ abstract class Options implements ServiceLocatorAwareInterface
*/ */
public function rememberLastView($last) public function rememberLastView($last)
{ {
$this->getSession()->lastView = $last; $session = $this->getSession();
if (!$session->getManager()->getStorage()->isImmutable()) {
$session->lastView = $last;
}
} }
/** /**
......
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