Browse Source

Avoiding some error messages

pull/3096/head
Michael 4 years ago
parent
commit
68115581d0
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      include/session.php

+ 3
- 2
include/session.php View File

@ -64,8 +64,9 @@ function ref_session_write($id, $data) {
$default_expire = time() + 300;
$memcache = cache::memcache();
if (is_object($memcache)) {
$memcache->set(get_app()->get_hostname().":session:".$id, $data, MEMCACHE_COMPRESSED, $expire);
$a = get_app();
if (is_object($memcache) AND is_object($a)) {
$memcache->set($a->get_hostname().":session:".$id, $data, MEMCACHE_COMPRESSED, $expire);
return true;
}


Loading…
Cancel
Save