Skip to content

Commit c7c1f3f

Browse files
committed
changed default session value to null instead of false
1 parent 45dcc83 commit c7c1f3f

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/Auth0.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ private function exchangeCode() {
273273
*/
274274
public function getUser() {
275275
// Ensure we have the user info
276-
if ($this->user === false) {
276+
if ($this->user === null) {
277277
$this->exchangeCode();
278278
}
279279
if (!is_array($this->user)) {
@@ -352,7 +352,7 @@ public function setAccessToken($access_token) {
352352
* @return string
353353
*/
354354
final public function getAccessToken() {
355-
if ($this->access_token === false) {
355+
if ($this->access_token === null) {
356356
$this->exchangeCode();
357357
}
358358
return $this->access_token;
@@ -381,7 +381,7 @@ public function setIdToken($id_token) {
381381
* @return string
382382
*/
383383
final public function getIdToken() {
384-
if ($this->id_token === false) {
384+
if ($this->id_token === null) {
385385
$this->exchangeCode();
386386
}
387387
return $this->id_token;

src/Store/EmptyStore.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class EmptyStore
2323
public function set($key, $value) {
2424
}
2525

26-
public function get($key, $default=false) {
26+
public function get($key, $default=null) {
2727
return $default;
2828
}
2929

src/Store/SessionStore.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function set($key, $value) {
6565
*
6666
* @return mixed
6767
*/
68-
public function get($key, $default=false) {
68+
public function get($key, $default=null) {
6969
$key_name = $this->getSessionKeyName($key);
7070

7171
if (isset($_SESSION[$key_name])) {

0 commit comments

Comments
 (0)