Commit 85c48915 authored by Marc Egger's avatar Marc Egger
Browse files

Revert "refs #7455 fix timeout check throws error since php.ini cookie...

Revert "refs #7455 fix timeout check throws error since php.ini cookie lifetime is zero during unit test"

don't change codebase to make tests work
parent 5c1a92bb
Pipeline #1172 passed with stage
in 1 minute and 26 seconds
......@@ -422,11 +422,8 @@ class Config {
*/
public static function checkSessionTimeout($timeout) {
// php.ini cookie life time is zero in a phpunit test
$isUnitTest = defined('PHPUNIT_COMPOSER_INSTALL') || defined('__PHPUNIT_PHAR__');
if (ini_get('session.gc_maxlifetime') < $timeout ||
(ini_get('session.cookie_lifetime') < $timeout && !$isUnitTest)
ini_get('session.cookie_lifetime') < $timeout
) {
throw new qfq\UserFormException ("The specified timeout of $timeout seconds is higher than the PHP config 'session.gc_maxlifetime' and/or 'session.cookie_lifetime'");
}
......
Supports Markdown
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