Treat PHP Errors on User session regenerate

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
Arthur Schiwon 2017-05-31 12:15:06 +02:00
parent ea9e6722de
commit aecb85cf64
No known key found for this signature in database
GPG Key ID: 7424F1874854DF23
1 changed files with 7 additions and 1 deletions

View File

@ -28,6 +28,7 @@
namespace OC\Session;
use OC\ServiceUnavailableException;
use OCP\Session\Exceptions\SessionNotAvailableException;
/**
@ -110,9 +111,14 @@ class Internal extends Session {
*
* @param bool $deleteOldSession Whether to delete the old associated session file or not.
* @return void
* @throws ServiceUnavailableException
*/
public function regenerateId($deleteOldSession = true) {
@session_regenerate_id($deleteOldSession);
try {
@session_regenerate_id($deleteOldSession);
} catch (\Error $e) {
$this->trapError($e->getCode(), $e->getMessage());
}
}
/**