Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

fixed detection of session cookies #24

Merged
merged 1 commit into from

2 participants

@xrstf

In line 191, the class checks if the lifetime is 0 by using ===. On my machine (PHP 5.3.9) , ini_get() actually returns a string and therefore the check fails. A cookie that expires immediately is created.

The proposed change makes the statement work and omits the expire declaration from the generated cookie header.

@xrstf xrstf fixed detection of session cookies
In line 191, the class checks if the lifetime is 0 by using ===.
On my machine (PHP 5.3.9) , ini_get() actually returns a string
and therefore the check fails. Instead, a cookie that expires
immediately is created.
4d620d9
@indeyets indeyets merged commit 9f22434 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 9, 2012
  1. @xrstf

    fixed detection of session cookies

    xrstf authored
    In line 191, the class checks if the lifetime is 0 by using ===.
    On my machine (PHP 5.3.9) , ini_get() actually returns a string
    and therefore the check fails. Instead, a cookie that expires
    immediately is created.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  AiP/Middleware/Session/Engine.php
View
2  AiP/Middleware/Session/Engine.php
@@ -78,7 +78,7 @@ public function start(array $options = array())
'cookie_name' => ini_get('session.name'),
'hash_algorithm' => 'sha1',
'storage' => __NAMESPACE__.'\Storage\FileStorage',
- 'cookie_lifetime' => ini_get('session.cookie_lifetime'),
+ 'cookie_lifetime' => (int) ini_get('session.cookie_lifetime'),
'cookie_path' => ini_get('session.cookie_path'),
'cookie_domain' => ini_get('session.cookie_domain'),
'cookie_secure' => ini_get('session.cookie_secure'),
Something went wrong with that request. Please try again.