Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/zend-session-configuration-setphpsavehandler' of h…
Browse files Browse the repository at this point in the history
…ttps://github.com/mwillbanks/zf2 into hotfix/session-configuration-setphpsavehandler
  • Loading branch information
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Configuration/SessionConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,21 +166,21 @@ protected function handleError($code, $message)
/**
* Set session.save_handler
*
* @param string $saveHandler
* @param string $phpSaveHandler
* @return SessionConfiguration
* @throws SessionException
*/
public function setPhpSaveHandler($saveHandler)
public function setPhpSaveHandler($phpSaveHandler)
{
$saveHandler = (string) $saveHandler;
$phpSaveHandler = (string) $phpSaveHandler;
set_error_handler(array($this, 'handleError'));
ini_set('session.save_handler', $saveHandler);
ini_set('session.save_handler', $phpSaveHandler);
restore_error_handler();
if ($this->phpErrorCode >= E_WARNING) {
throw new Exception\InvalidArgumentException('Invalid save handler specified');
}

$this->setOption('save_handler', $saveHandler);
$this->setOption('save_handler', $phpSaveHandler);
return $this;
}

Expand Down

0 comments on commit 4de92b2

Please sign in to comment.