mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
fixes #2296 include the correct class file depending on the version of php
This commit is contained in:
34
include/pwgsession_php7.class.php
Normal file
34
include/pwgsession_php7.class.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
// see https://php.watch/versions/8.4/session_set_save_handler-alt-signature-deprecated
|
||||
// https://github.com/Piwigo/Piwigo/issues/2296
|
||||
class PwgSession implements SessionHandlerInterface {
|
||||
public function open($path, $name)
|
||||
{
|
||||
return pwg_session_open($path, $name);
|
||||
}
|
||||
|
||||
public function close()
|
||||
{
|
||||
return pwg_session_close();
|
||||
}
|
||||
|
||||
public function read($id)
|
||||
{
|
||||
return pwg_session_read($id);
|
||||
}
|
||||
|
||||
public function write($id, $data)
|
||||
{
|
||||
return pwg_session_write($id, $data);
|
||||
}
|
||||
|
||||
public function destroy($id)
|
||||
{
|
||||
return pwg_session_destroy($id);
|
||||
}
|
||||
|
||||
public function gc($max_lifetime)
|
||||
{
|
||||
return pwg_session_gc();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user