Skip to content
Snippets Groups Projects
Commit 27fff665 authored by Ere Maijala's avatar Ere Maijala Committed by Demian Katz
Browse files

Further session handling fixes for PHP 7.

parent 676db9c1
No related merge requests found
......@@ -81,7 +81,7 @@ abstract class AbstractBase implements SaveHandlerInterface,
* @param string $sess_path Session save path
* @param string $sess_name Session name
*
* @return void
* @return bool
*
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
......@@ -94,7 +94,7 @@ abstract class AbstractBase implements SaveHandlerInterface,
* Close function, this works like a destructor in classes and is executed
* when the session operation is done.
*
* @return void
* @return bool
*/
public function close()
{
......@@ -111,12 +111,13 @@ abstract class AbstractBase implements SaveHandlerInterface,
*
* @param string $sess_id The session ID to destroy
*
* @return void
* @return bool
*/
public function destroy($sess_id)
{
$table = $this->getTable('Search');
$table->destroySession($sess_id);
return true;
}
/**
......@@ -125,7 +126,7 @@ abstract class AbstractBase implements SaveHandlerInterface,
*
* @param int $sess_maxlifetime Maximum session lifetime.
*
* @return void
* @return bool
*
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
......@@ -142,5 +143,6 @@ abstract class AbstractBase implements SaveHandlerInterface,
// Anecdotal testing Today and Yesterday seems to indicate destroy()
// is called by the garbage collector and everything is good.
// Something to keep in mind though.
return true;
}
}
\ No newline at end of file
}
......@@ -79,7 +79,7 @@ class Database extends AbstractBase
*
* @param string $sess_id The session ID to destroy
*
* @return void
* @return bool
*/
public function destroy($sess_id)
{
......@@ -88,6 +88,8 @@ class Database extends AbstractBase
// Now do database-specific destruction:
$this->getTable('Session')->destroySession($sess_id);
return true;
}
/**
......@@ -96,10 +98,11 @@ class Database extends AbstractBase
*
* @param int $sess_maxlifetime Maximum session lifetime.
*
* @return void
* @return bool
*/
public function gc($sess_maxlifetime)
{
$this->getTable('Session')->garbageCollect($sess_maxlifetime);
return true;
}
}
......@@ -132,7 +132,7 @@ class File extends AbstractBase
*
* @param string $sess_id The session ID to destroy
*
* @return void
* @return bool
*/
public function destroy($sess_id)
{
......@@ -153,7 +153,7 @@ class File extends AbstractBase
*
* @param int $maxlifetime Maximum session lifetime.
*
* @return void
* @return bool
*/
public function gc($maxlifetime)
{
......
......@@ -110,7 +110,7 @@ class Memcache extends AbstractBase
*
* @param string $sess_id The session ID to destroy
*
* @return void
* @return bool
*/
public function destroy($sess_id)
{
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment