mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-27 09:30:06 +00:00
(bug 37643) Ensure a session is created when necessary for Captcha
If the captcha data is going to be stored in the session, make sure the session has actually been started. Change-Id: Ia5eefdf738fad3fdbd305f1b3ce80dc86c66efe4
This commit is contained in:
parent
f8a270393f
commit
cf78b84807
|
@ -59,6 +59,13 @@ abstract class CaptchaStore {
|
|||
|
||||
class CaptchaSessionStore extends CaptchaStore {
|
||||
|
||||
protected function __construct() {
|
||||
// Make sure the session is started
|
||||
if ( session_id() === '' ) {
|
||||
wfSetupSession();
|
||||
}
|
||||
}
|
||||
|
||||
function store( $index, $info ) {
|
||||
$_SESSION['captcha' . $info['index']] = $info;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue