From 56df3fd8cafde10b230c925c7eb455003ae76382 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sat, 20 Jul 2013 22:02:51 +0200 Subject: [ticket/11720] Do not call $captcha->validate if $captcha is not set PHPBB3-11566 changed big parts of code. Unfortunately, a call to $captcha->validate was added that is being called even if $captcha hasn't been initialized. This change will fix this issue. PHPBB3-11720 --- phpBB/report.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'phpBB/report.php') diff --git a/phpBB/report.php b/phpBB/report.php index c92ecdfdcc..c909b4fcf3 100644 --- a/phpBB/report.php +++ b/phpBB/report.php @@ -146,10 +146,13 @@ $s_hidden_fields = ''; // Submit report? if ($submit && $reason_id) { - $visual_confirmation_response = $captcha->validate(); - if ($visual_confirmation_response) + if (isset($captcha)) { - $error[] = $visual_confirmation_response; + $visual_confirmation_response = $captcha->validate(); + if ($visual_confirmation_response) + { + $error[] = $visual_confirmation_response; + } } $sql = 'SELECT * -- cgit v1.2.3-65-gdbad