mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-31 00:59:58 +09:00
Fix fatal error if CAPTCHA is configured but disabled
This commit is contained in:
parent
aaf3791a78
commit
04b158c544
2 changed files with 8 additions and 4 deletions
|
|
@ -337,8 +337,12 @@ class SpamfilterController extends Spamfilter
|
|||
if (count($target_actions))
|
||||
{
|
||||
$captcha_class = 'Rhymix\\Modules\\Spamfilter\\Captcha\\' . $config->captcha->type;
|
||||
$captcha_class::init($config->captcha);
|
||||
if (!class_exists($captcha_class))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$captcha_class::init($config->captcha);
|
||||
if (strncasecmp('proc', $obj->act, 4) === 0)
|
||||
{
|
||||
$captcha_class::check();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue