Skip to content

Commit 1a98f2f

Browse files
Fixed issue where the session cookie may not be set in some cases (fixes
issue #3)
1 parent 973db65 commit 1a98f2f

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

code/classes/CodeBankAMFServer.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,5 +119,13 @@ protected function _buildDispatchTable() {
119119

120120
$this->_table=$table;
121121
}
122+
123+
/**
124+
* Whether of not the server is using sessions
125+
* @return bool
126+
*/
127+
public function isSession() {
128+
return ($this->_session || array_key_exists($this->_sessionName, $_COOKIE));
129+
}
122130
}
123131
?>

code/control/CodeBankClientAPI.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ public function init() {
1717
* Handles all amf requests
1818
*/
1919
public function index() {
20+
//Ensure the session is started
21+
Session::start();
22+
2023
//Start the server
2124
$server=new CodeBankAMFServer();
2225

0 commit comments

Comments
 (0)