mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
php8+ friendly fixes
This commit is contained in:
@@ -103,7 +103,7 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa
|
|||||||
* @param string $name Session cookie name, unused
|
* @param string $name Session cookie name, unused
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function open($save_path, $name)
|
public function open(string $save_path, string $name): bool
|
||||||
{
|
{
|
||||||
$this->_memcached = new Memcached();
|
$this->_memcached = new Memcached();
|
||||||
$this->_memcached->setOption(Memcached::OPT_BINARY_PROTOCOL, TRUE); // required for touch() usage
|
$this->_memcached->setOption(Memcached::OPT_BINARY_PROTOCOL, TRUE); // required for touch() usage
|
||||||
@@ -160,7 +160,7 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa
|
|||||||
* @param string $session_id Session ID
|
* @param string $session_id Session ID
|
||||||
* @return string Serialized session data
|
* @return string Serialized session data
|
||||||
*/
|
*/
|
||||||
public function read($session_id)
|
public function read(string $session_id): string|false
|
||||||
{
|
{
|
||||||
if (isset($this->_memcached) && $this->_get_lock($session_id))
|
if (isset($this->_memcached) && $this->_get_lock($session_id))
|
||||||
{
|
{
|
||||||
@@ -186,7 +186,7 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa
|
|||||||
* @param string $session_data Serialized session data
|
* @param string $session_data Serialized session data
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function write($session_id, $session_data)
|
public function write(string $session_id, string $session_data): bool
|
||||||
{
|
{
|
||||||
if ( ! isset($this->_memcached, $this->_lock_key))
|
if ( ! isset($this->_memcached, $this->_lock_key))
|
||||||
{
|
{
|
||||||
@@ -237,7 +237,7 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa
|
|||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function close()
|
public function close(): bool
|
||||||
{
|
{
|
||||||
if (isset($this->_memcached))
|
if (isset($this->_memcached))
|
||||||
{
|
{
|
||||||
@@ -264,7 +264,7 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa
|
|||||||
* @param string $session_id Session ID
|
* @param string $session_id Session ID
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function destroy($session_id)
|
public function destroy(string $session_id): bool
|
||||||
{
|
{
|
||||||
if (isset($this->_memcached, $this->_lock_key))
|
if (isset($this->_memcached, $this->_lock_key))
|
||||||
{
|
{
|
||||||
@@ -286,10 +286,10 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa
|
|||||||
* @param int $maxlifetime Maximum lifetime of sessions
|
* @param int $maxlifetime Maximum lifetime of sessions
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function gc($maxlifetime)
|
public function gc(int $maxlifetime): int|false
|
||||||
{
|
{
|
||||||
// Not necessary, Memcached takes care of that.
|
// Not necessary, Memcached takes care of that.
|
||||||
return $this->_success;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user