aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorasperous <asperous2@gmail.com>2013-07-13 08:38:02 -0700
committerAndy Chase <asperous2@gmail.com>2013-07-22 11:07:48 -0700
commitde2cb595336ee49aeb4bab4ee857fbe71e249599 (patch)
tree21fdbd5374a221cf3f78cfaf740c8eff213b7994
parent25b189d33bbf2b94da6f9f969e8d91ade8eba30a (diff)
downloadforums-de2cb595336ee49aeb4bab4ee857fbe71e249599.tar
forums-de2cb595336ee49aeb4bab4ee857fbe71e249599.tar.gz
forums-de2cb595336ee49aeb4bab4ee857fbe71e249599.tar.bz2
forums-de2cb595336ee49aeb4bab4ee857fbe71e249599.tar.xz
forums-de2cb595336ee49aeb4bab4ee857fbe71e249599.zip
[ticket/11620] Fix a static calls to non-static for session captcha
These changes fixes an error in certain version of php that throws an error if you call a non-static method statically. PHPBB3-11620
-rw-r--r--phpBB/includes/captcha/captcha_factory.php3
-rw-r--r--phpBB/includes/session.php3
2 files changed, 4 insertions, 2 deletions
diff --git a/phpBB/includes/captcha/captcha_factory.php b/phpBB/includes/captcha/captcha_factory.php
index 1ed8e119b5..af79f059fe 100644
--- a/phpBB/includes/captcha/captcha_factory.php
+++ b/phpBB/includes/captcha/captcha_factory.php
@@ -50,7 +50,8 @@ class phpbb_captcha_factory
{
include($phpbb_root_path . "includes/captcha/plugins/{$name}_plugin." . $phpEx);
}
- call_user_func(array($name, 'garbage_collect'), 0);
+ $captcha = new $name;
+ $captcha->garbage_collect('');
}
/**
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index 66bf053f7d..392a55e48f 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -1016,7 +1016,8 @@ class phpbb_session
{
include($phpbb_root_path . "includes/captcha/captcha_factory." . $phpEx);
}
- phpbb_captcha_factory::garbage_collect($config['captcha_plugin']);
+ $captcha_factory = new phpbb_captcha_factory();
+ $captcha_factory->garbage_collect($config['captcha_plugin']);
$sql = 'DELETE FROM ' . LOGIN_ATTEMPT_TABLE . '
WHERE attempt_time < ' . (time() - (int) $config['ip_login_limit_time']);