Aleksander Machniak
2015-09-19 7bbb86f78aad9c9ed71054e9e5f9ab01a9c04b17
Session read  handler must return a string in PHP7
3 files modified
16 ■■■■■ changed files
program/lib/Roundcube/rcube_session.php 12 ●●●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_session_db.php 2 ●●●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_session_redis.php 2 ●●●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_session.php
@@ -157,7 +157,7 @@
        $oldvars = $this->get_cache($key);
        // if there are cached vars, update store, else insert new data
        if ($oldvars !== null) {
        if ($oldvars) {
            $newvars = $this->_fixvars($vars, $oldvars);
            return $this->update($key, $newvars, $oldvars);
        }
@@ -267,10 +267,11 @@
    }
    /**
     * see if we have vars of this key already cached, and if so, return them.
     * See if we have vars of this key already cached, and if so, return them.
     *
     * @param $key
     * @return null|array
     * @param string $key Session ID
     *
     * @return string
     */
    protected function get_cache($key)
    {
@@ -285,6 +286,7 @@
        else { // else read data again
            $cache = $this->read($key);
        }
        return $cache;
    }
@@ -374,7 +376,7 @@
            $node[$k] = $value;
        }
        if($this->key) {
        if ($this->key) {
            $data = $this->read($this->key);
        }
program/lib/Roundcube/rcube_session_db.php
@@ -108,6 +108,8 @@
            return !empty($this->vars) ? (string) $this->vars : '';
        }
        return '';
    }
    /**
program/lib/Roundcube/rcube_session_redis.php
@@ -169,6 +169,8 @@
            return !empty($this->vars) ? (string) $this->vars : '';
        }
        return '';
    }
    /**