Created
September 15, 2012 14:35
-
-
Save peta/3728242 to your computer and use it in GitHub Desktop.
Small fix that prevents session data from getting corrupted when the Facebook PHP SDK is used within Kohana
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Index: src/application/vendor/facebook-sdk/src/facebook.php | |
| IDEA additional info: | |
| Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
| <+>UTF-8 | |
| =================================================================== | |
| --- src/application/vendor/facebook-sdk/src/facebook.php (revision ) | |
| +++ src/application/vendor/facebook-sdk/src/facebook.php (revision ) | |
| @@ -106,7 +106,7 @@ | |
| } | |
| $session_var_name = $this->constructSessionVariableName($key); | |
| - $_SESSION[$session_var_name] = $value; | |
| + Session::instance()->set($session_var_name, $value); | |
| } | |
| protected function getPersistentData($key, $default = false) { | |
| @@ -116,8 +116,7 @@ | |
| } | |
| $session_var_name = $this->constructSessionVariableName($key); | |
| - return isset($_SESSION[$session_var_name]) ? | |
| - $_SESSION[$session_var_name] : $default; | |
| + return Session::instance()->get($session_var_name, $default); | |
| } | |
| protected function clearPersistentData($key) { | |
| @@ -127,7 +126,7 @@ | |
| } | |
| $session_var_name = $this->constructSessionVariableName($key); | |
| - unset($_SESSION[$session_var_name]); | |
| + Session::instance()->delete($session_var_name); | |
| } | |
| protected function clearAllPersistentData() { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment