Commit 12bc7056 authored by Kjartan's avatar Kjartan

- preventing a segfault in PHP. Can someone verify that session writing still works?

parent 5f7e2f7a
......@@ -23,7 +23,7 @@ function sess_read($key) {
global $user;
$user = user_load(array("sid" => $key, "status" => 1));
return $user->session ? $user->session : '';
return !empty($user->session) ? $user->session : '';
}
function sess_write($key, $value) {
......
......@@ -23,7 +23,7 @@ function sess_read($key) {
global $user;
$user = user_load(array("sid" => $key, "status" => 1));
return $user->session ? $user->session : '';
return !empty($user->session) ? $user->session : '';
}
function sess_write($key, $value) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment