summaryrefslogtreecommitdiffstats
path: root/Csrf
diff options
context:
space:
mode:
authorGraham Campbell <graham@mineuk.com>2014-11-30 21:18:40 +0000
committerNicolas Grekas <nicolas.grekas@gmail.com>2014-12-30 11:17:11 +0100
commitd278266e82082b8605dffb29151bd77b9f3d334f (patch)
treef03b1102eb11208ab010e3f57ba036e555a167e6 /Csrf
parentcf187660de37c0dc7a4dec4475845c314e8fb91f (diff)
downloadsymfony-security-d278266e82082b8605dffb29151bd77b9f3d334f.zip
symfony-security-d278266e82082b8605dffb29151bd77b9f3d334f.tar.gz
symfony-security-d278266e82082b8605dffb29151bd77b9f3d334f.tar.bz2
[3.0] Removed some old hacks
Diffstat (limited to 'Csrf')
-rw-r--r--Csrf/Tests/TokenStorage/NativeSessionTokenStorageTest.php4
-rw-r--r--Csrf/TokenStorage/NativeSessionTokenStorage.php6
2 files changed, 1 insertions, 9 deletions
diff --git a/Csrf/Tests/TokenStorage/NativeSessionTokenStorageTest.php b/Csrf/Tests/TokenStorage/NativeSessionTokenStorageTest.php
index 0039deb..ef49f2f 100644
--- a/Csrf/Tests/TokenStorage/NativeSessionTokenStorageTest.php
+++ b/Csrf/Tests/TokenStorage/NativeSessionTokenStorageTest.php
@@ -52,10 +52,6 @@ class NativeSessionTokenStorageTest extends \PHPUnit_Framework_TestCase
public function testStoreTokenInClosedSessionWithExistingSessionId()
{
- if (PHP_VERSION_ID < 50400) {
- $this->markTestSkipped('This test requires PHP 5.4 or later.');
- }
-
session_id('foobar');
$this->assertSame(PHP_SESSION_NONE, session_status());
diff --git a/Csrf/TokenStorage/NativeSessionTokenStorage.php b/Csrf/TokenStorage/NativeSessionTokenStorage.php
index 60145c6..4229bb6 100644
--- a/Csrf/TokenStorage/NativeSessionTokenStorage.php
+++ b/Csrf/TokenStorage/NativeSessionTokenStorage.php
@@ -108,11 +108,7 @@ class NativeSessionTokenStorage implements TokenStorageInterface
private function startSession()
{
- if (PHP_VERSION_ID >= 50400) {
- if (PHP_SESSION_NONE === session_status()) {
- session_start();
- }
- } elseif (!session_id()) {
+ if (PHP_SESSION_NONE === session_status()) {
session_start();
}