Fixed bug that occured when custom questions were turned on, but no questions were provided.

This commit is contained in:
Janek Bevendorff 2012-08-12 16:13:36 +02:00 committed by Janek Bevendorff
parent 8b8b76642a
commit 88e44f1877

View file

@ -538,7 +538,7 @@ class serendipity_event_spamblock_bee extends serendipity_event
$question = $this->selectRandomCustomCaptchaQuestion();
if (null === $question) {
// no valid question could be selected, fall back to math questions
$questionType = 'math';
$this->captchaQuestionType = 'math';
$this->set_config('question_type', 'math');
} else {
$this->setCaptchaAnswer($question['answer']);