aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2013-07-20 22:02:51 +0200
committerMarc Alexander <admin@m-a-styles.de>2013-07-21 18:50:06 +0200
commit56df3fd8cafde10b230c925c7eb455003ae76382 (patch)
tree40b23c10d0f60b56a03efb1814fa970b95203229
parent036a4188f3409387046aacaf22854edae4ace999 (diff)
downloadforums-56df3fd8cafde10b230c925c7eb455003ae76382.tar
forums-56df3fd8cafde10b230c925c7eb455003ae76382.tar.gz
forums-56df3fd8cafde10b230c925c7eb455003ae76382.tar.bz2
forums-56df3fd8cafde10b230c925c7eb455003ae76382.tar.xz
forums-56df3fd8cafde10b230c925c7eb455003ae76382.zip
[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
-rw-r--r--phpBB/report.php9
1 files changed, 6 insertions, 3 deletions
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 *