Skip to content

Conversation

brunoais
Copy link
Contributor

@brunoais brunoais commented Apr 5, 2012

These changes should solve the strict standards error about accessing
the non-static get_instance() in a non-static way.
For that, I changed the get_instance methods to static methods.

PHPBB3-10575

@igorw
Copy link
Contributor

igorw commented Apr 5, 2012

Might as well add visibility, eg. public. Apart from that, looks good.

@@ -98,7 +98,7 @@ function init($type)
/**
* API function
*/
function get_instance()
static function get_instance()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be only one space

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had already fixed :)

@bantu
Copy link
Collaborator

bantu commented Apr 5, 2012

Not sure whether ./includes/captcha/captcha_factory.php: $instance = call_user_func(array($name, 'get_instance')); should be changes as well.

brunoais added 2 commits April 5, 2012 14:14
These changes should solve the strict standards error about accessing
the non-static get_instance() in a non-static way.
For that, I changed the get_instance methods to static methods.

PHPBB3-10575
Added public visibility to the methods

PHPBB3-10575
@brunoais
Copy link
Contributor Author

brunoais commented Apr 5, 2012

@bantu what needs to be changed about call_user_func?

@bantu
Copy link
Collaborator

bantu commented Apr 5, 2012

Could be changed to $name::get_instance() but I don't know whether it has to. call_user_func() might work just fine.

@bantu bantu merged commit 2bf1c4e into phpbb:develop Apr 5, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants