Skip to content

Commit

Permalink
Fix polyfill support issue in CSRF validator
Browse files Browse the repository at this point in the history
- typehint on AbstractContainer
- when instantiating a Container instance, use fully qualified class name in
  order to trigger alias
  • Loading branch information
weierophinney committed Mar 5, 2013
1 parent 843ac05 commit 05bc3b1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions library/Zend/Validator/Csrf.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

use Traversable;
use Zend\Math\Rand;
use Zend\Session\Container as SessionContainer;
use Zend\Session\AbstractContainer as SessionContainer;
use Zend\Stdlib\ArrayUtils;

class Csrf extends AbstractValidator
Expand Down Expand Up @@ -174,7 +174,8 @@ public function setSession(SessionContainer $session)
public function getSession()
{
if (null === $this->session) {
$this->session = new SessionContainer($this->getSessionName());
// Using fully qualified name, to ensure polyfill class alias is used
$this->session = new \Zend\Session\Container($this->getSessionName());
}
return $this->session;
}
Expand Down

0 comments on commit 05bc3b1

Please sign in to comment.