aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/language/en/acp/common.php1
-rw-r--r--phpBB/phpbb/captcha/plugins/qa.php12
2 files changed, 9 insertions, 4 deletions
diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php
index fdbc4aebd0..88e60d00a3 100644
--- a/phpBB/language/en/acp/common.php
+++ b/phpBB/language/en/acp/common.php
@@ -594,6 +594,7 @@ $lang = array_merge($lang, array(
'LOG_ERROR_JABBER' => '<strong>Jabber error</strong><br />» %s',
'LOG_ERROR_EMAIL' => '<strong>Email error</strong><br />» %s',
+ 'LOG_ERROR_CAPTCHA' => '<strong>CAPTCHA error</strong><br />» %s',
'LOG_FORUM_ADD' => '<strong>Created new forum</strong><br />» %s',
'LOG_FORUM_COPIED_PERMISSIONS' => '<strong>Copied forum permissions</strong> from %1$s<br />» %2$s',
diff --git a/phpBB/phpbb/captcha/plugins/qa.php b/phpBB/phpbb/captcha/plugins/qa.php
index e6059b968f..8f2da838c5 100644
--- a/phpBB/phpbb/captcha/plugins/qa.php
+++ b/phpBB/phpbb/captcha/plugins/qa.php
@@ -220,10 +220,12 @@ class qa
*/
function get_template()
{
- global $template;
+ global $phpbb_log, $template, $user;
- if ($this->is_solved() || !count($this->question_ids))
+ if ($this->is_solved() || empty($this->question_text) || !count($this->question_ids))
{
+ /** @var \phpbb\log\log_interface $phpbb_log */
+ $phpbb_log->add('critical', $user->data['user_id'], $user->ip, 'LOG_ERROR_CAPTCHA', time(), array($user->lang('CONFIRM_QUESTION_MISSING')));
return false;
}
else
@@ -386,13 +388,15 @@ class qa
*/
function validate()
{
- global $user;
+ global $phpbb_log, $user;
$error = '';
if (!sizeof($this->question_ids))
{
- return $user->lang['CONFIRM_QUESTION_MISSING'];
+ /** @var \phpbb\log\log_interface $phpbb_log */
+ $phpbb_log->add('critical', $user->data['user_id'], $user->ip, 'LOG_ERROR_CAPTCHA', time(), array($user->lang('CONFIRM_QUESTION_MISSING')));
+ return $user->lang('CONFIRM_QUESTION_MISSING');
}
if (!$this->confirm_id)