Skip to content

Commit 03ec359

Browse files
captcha validate helper fixed
1 parent 2cf9fa0 commit 03ec359

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/helpers.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ function create_captcha()
133133
*/
134134
function validate_captcha($userInput)
135135
{
136+
if (session_status() === PHP_SESSION_NONE) {
137+
session_start();
138+
}
136139
if (isset($_SESSION['phrase']) && PhraseBuilder::comparePhrases($_SESSION['phrase'], $userInput)) {
137140
return true;
138141
unset($_SESSION['phrase']);

0 commit comments

Comments
 (0)