mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
[PHP8.1] Added some fixes for PHP 8.1
This commit is contained in:
@@ -129,7 +129,7 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle
|
||||
* @param string $name Session cookie name
|
||||
* @return bool
|
||||
*/
|
||||
public function open($save_path, $name)
|
||||
public function open($save_path, $name): bool
|
||||
{
|
||||
if ( ! is_dir($save_path))
|
||||
{
|
||||
@@ -165,6 +165,7 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle
|
||||
* @param string $session_id Session ID
|
||||
* @return string Serialized session data
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function read($session_id)
|
||||
{
|
||||
// This might seem weird, but PHP 5.6 introduces session_reset(),
|
||||
@@ -238,6 +239,7 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle
|
||||
* @param string $session_data Serialized session data
|
||||
* @return bool
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function write($session_id, $session_data)
|
||||
{
|
||||
// If the two IDs don't match, we have a session_regenerate_id() call
|
||||
@@ -295,6 +297,7 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function close()
|
||||
{
|
||||
if (is_resource($this->_file_handle))
|
||||
@@ -318,6 +321,7 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle
|
||||
* @param string $session_id Session ID
|
||||
* @return bool
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function destroy($session_id)
|
||||
{
|
||||
if ($this->close() === $this->_success)
|
||||
@@ -359,6 +363,7 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle
|
||||
* @param int $maxlifetime Maximum lifetime of sessions
|
||||
* @return bool
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function gc($maxlifetime)
|
||||
{
|
||||
if ( ! is_dir($this->_config['save_path']) OR ($directory = opendir($this->_config['save_path'])) === FALSE)
|
||||
|
||||
Reference in New Issue
Block a user