mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-07 17:27:16 +02:00
[ticket/9608] Remove use of references in captcha and other places
References are not really needed in PHP due to copy-on-write. Since PHP5, objects are always passed around as identifiers, which means they are mutable. So it is no longer required to pass these by reference either. PHPBB3-9608
This commit is contained in:
@@ -50,9 +50,9 @@ class phpbb_captcha_gd extends phpbb_default_captcha
|
||||
}
|
||||
}
|
||||
|
||||
function &get_instance()
|
||||
function get_instance()
|
||||
{
|
||||
$instance =& new phpbb_captcha_gd();
|
||||
$instance = new phpbb_captcha_gd();
|
||||
return $instance;
|
||||
}
|
||||
|
||||
|
@@ -40,9 +40,9 @@ class phpbb_captcha_nogd extends phpbb_default_captcha
|
||||
}
|
||||
}
|
||||
|
||||
function &get_instance()
|
||||
function get_instance()
|
||||
{
|
||||
$instance =& new phpbb_captcha_nogd();
|
||||
$instance = new phpbb_captcha_nogd();
|
||||
return $instance;
|
||||
}
|
||||
|
||||
|
@@ -99,9 +99,9 @@ class phpbb_captcha_qa
|
||||
/**
|
||||
* API function
|
||||
*/
|
||||
function &get_instance()
|
||||
function get_instance()
|
||||
{
|
||||
$instance =& new phpbb_captcha_qa();
|
||||
$instance = new phpbb_captcha_qa();
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
@@ -54,9 +54,9 @@ class phpbb_recaptcha extends phpbb_default_captcha
|
||||
$this->response = request_var('recaptcha_response_field', '');
|
||||
}
|
||||
|
||||
function &get_instance()
|
||||
function get_instance()
|
||||
{
|
||||
$instance =& new phpbb_recaptcha();
|
||||
$instance = new phpbb_recaptcha();
|
||||
return $instance;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user