Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
joshcanhelp committed Sep 14, 2018
1 parent 7cfa964 commit a663631
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Store/SessionStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ class SessionStore implements StoreInterface
/**
* SessionStore constructor.
*
* @param string|null $base_name Session base name.
* @param integer $cookie_expires Session expiration in seconds; default is 1 week.
* @param string $base_name Session base name.
* @param integer $cookie_expires Session expiration in seconds; default is 1 week.
*/
public function __construct($base_name = self::BASE_NAME, $cookie_expires = self::COOKIE_EXPIRES)
{
Expand Down Expand Up @@ -121,6 +121,10 @@ public function delete($key)
*/
public function getSessionKeyName($key)
{
return $this->session_base_name.'_'.$key;
$key_name = $key;
if ( ! empty( $this->session_base_name ) ) {
$key_name = $this->session_base_name.'_'.$key_name;
}
return $key_name;
}
}

0 comments on commit a663631

Please sign in to comment.