diff --git a/composer.lock b/composer.lock index 3249ec0..88edac2 100644 --- a/composer.lock +++ b/composer.lock @@ -492,16 +492,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.64", + "version": "0.12.66", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "23eb1cb7ae125f45f1d0e48051bcf67a9a9b08aa" + "reference": "4110a2425c6bd53acbdfcda07885e87b66e9ba3e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/23eb1cb7ae125f45f1d0e48051bcf67a9a9b08aa", - "reference": "23eb1cb7ae125f45f1d0e48051bcf67a9a9b08aa", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/4110a2425c6bd53acbdfcda07885e87b66e9ba3e", + "reference": "4110a2425c6bd53acbdfcda07885e87b66e9ba3e", "shasum": "" }, "require": { @@ -544,7 +544,7 @@ "type": "tidelift" } ], - "time": "2020-12-21T11:59:02+00:00" + "time": "2021-01-11T16:43:15+00:00" }, { "name": "phpunit/php-code-coverage", @@ -1845,16 +1845,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.20.0", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41" + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f4ba089a5b6366e453971d3aad5fe8e897b37f41", - "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e", + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", "shasum": "" }, "require": { @@ -1866,7 +1866,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1917,7 +1917,7 @@ "type": "tidelift" } ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "theseer/tokenizer", diff --git a/src/Session.php b/src/Session.php index f8ceea0..5289b05 100644 --- a/src/Session.php +++ b/src/Session.php @@ -36,6 +36,7 @@ public function __construct( $config["save_path"] ?? self::DEFAULT_SESSION_PATH ); $sessionName = $config["name"] ?? self::DEFAULT_SESSION_NAME; + $sessionStartAttempts = 0; do { $success = @session_start([ @@ -49,10 +50,11 @@ public function __construct( ]); if(!$success) { - session_destroy(); + $sessionStartAttempts++; + @session_destroy(); } } - while(!$success); + while(!$success && $sessionStartAttempts <= 1); $this->sessionHandler->open($sessionPath, $sessionName); $this->store = $this->readSessionData() ?: null;