Static Context – PHP 5.4 Strict Standards Warnings
-
Hello,
First of all, I would like to say the plugin is very good. There are some issues which are not unexpected to exist in the first versions. 🙂The plugin is with clean code which does not rise notices and warnings which is good (at least I dont see them), except on the newer version of PHP where static routines should be explicitly defined as such, like in the other programming languages.
The issues I have encountered are in: /includes/classes/ssp_skin.php
The following methods should be declared as static, otherwise new versions will rise:
Strict standards: Non-static method SSP_SKIN::method should not be called statically, assuming $this from incompatible context
Those methods are:
- SSP_SKIN::setup_slider()
- SSP_SKIN::set_active_skin()
- SSP_SKIN::is_default_skin()
- SSP_SKIN::get_skin_path()
I would suggest to add access modifiers as well:
public static function ...
No matter PHP default is public, in most languages it is private. I would not be surprised if in future such change appear. Also it improves readability. 🙂
It is WP and plugin version independent.
Regards
- The topic ‘Static Context – PHP 5.4 Strict Standards Warnings’ is closed to new replies.