Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix stray dot (.) in case where domain in setcookie was not being use…

…d. closes #74
  • Loading branch information...
commit c9db0b411842076b32ecbc49327f9f745ff3e567 1 parent 4dff0b0
@daaku daaku authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/facebook.php
View
7 src/facebook.php
@@ -554,6 +554,11 @@ protected function setCookieFromSession($session=null) {
$expires = $session['expires'];
}
+ // prepend dot if a domain is found
+ if ($domain) {
+ $domain = '.' . $domain;
+ }
+
// if an existing cookie is not set, we dont need to delete it
if ($value == 'deleted' && empty($_COOKIE[$cookieName])) {
return;
@@ -571,7 +576,7 @@ protected function setCookieFromSession($session=null) {
// environment
// @codeCoverageIgnoreStart
} else {
- setcookie($cookieName, $value, $expires, '/', '.' . $domain);
+ setcookie($cookieName, $value, $expires, '/', $domain);
}
// @codeCoverageIgnoreEnd
}
Please sign in to comment.
Something went wrong with that request. Please try again.