mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-01-19 01:24:05 +01:00
Fix crash if no captcha is enabled
This commit is contained in:
parent
3016d69428
commit
650ef8bcc2
8
post.php
8
post.php
@ -627,9 +627,11 @@ if (isset($_POST['delete'])) {
|
|||||||
$query = RemoteCaptchaQuery::withHCaptcha($context->getHttpDriver(), $config['hcaptcha_private']);
|
$query = RemoteCaptchaQuery::withHCaptcha($context->getHttpDriver(), $config['hcaptcha_private']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$success = $query->verify($response, $_SERVER['REMOTE_ADDR']);
|
if (isset($query, $response)) {
|
||||||
if (!$success) {
|
$success = $query->verify($response, $_SERVER['REMOTE_ADDR']);
|
||||||
error($config['error']['captcha']);
|
if (!$success) {
|
||||||
|
error($config['error']['captcha']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (RuntimeException $e) {
|
} catch (RuntimeException $e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user