Skip to content

Commit

Permalink
These session methods are required to return true as of PHP 7.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Sep 28, 2016
1 parent 526b69d commit 44baa4c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
17 changes: 13 additions & 4 deletions framework/Core/lib/Horde/Core/Factory/SessionHandler.php
Expand Up @@ -127,12 +127,12 @@ public function readSessionData($session_data)
$stub = new Horde_Support_Stub();

session_set_save_handler(
array($stub, 'open'),
array($stub, 'close'),
array($this, '_returnTrue'),
array($this, '_returnTrue'),
array($stub, 'read'),
array($stub, 'write'),
array($stub, 'destroy'),
array($stub, 'gc')
array($this, '_returnTrue'),
array($this, '_returnTrue')
);

ob_start();
Expand Down Expand Up @@ -165,4 +165,13 @@ public function readSessionData($session_data)
: false;
}

/**
* Stub method.
*
* @return boolean True
*/
protected function _returnTrue()
{
return true;
}
}
4 changes: 2 additions & 2 deletions framework/Core/package.xml
Expand Up @@ -39,7 +39,7 @@
</stability>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
*
* [jan] Fix reading session data from the command line with PHP 7.
</notes>
<contents>
<dir baseinstalldir="/" name="/">
Expand Down Expand Up @@ -4274,7 +4274,7 @@
<date>2016-09-21</date>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
*
* [jan] Fix reading session data from the command line with PHP 7.
</notes>
</release>
</changelog>
Expand Down

0 comments on commit 44baa4c

Please sign in to comment.