Plugin

Archived
Forum
(read-only)

Math Plus

ExpressionEngine 1.x, ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From Laisvunas

     

usage() should not be called statically - Expression Engine 2.9.2, PHP 5.6

Support Request

okenathan
okenathan

The latest version of EE, combined with a brand new server gives us a nice warning:

A PHP Error was encountered
Severity
8192
Message
Non-static method Math_plus::usage() should not be called staticallyassuming $this from incompatible context
Filename
math_plus/pi.math_plus.php
Line Number
28 

Ellislab has something to say about it:
https://support.ellislab.com/bugs/detail/20352/plugins-through-php-warning-with-strict-errors-on

Can you please fix this?

Laisvunas
# 1
Developer
Laisvunas

Hi,

It seems that changing the line

function usage() 

into

public static function usage() 

might work. But I cannot check if it really does because I have no server which outputs this error message.

okenathan
# 2
okenathan

Just a quick response: The “public static” solution worked!