Posts Tagged with E_ALL

Displaying 1-1 of 1 result.
Resolved: error :should not be called statically, assuming $this from incompatible context. only on my machine
posted by admin on June 3, 2016
My team members wrote the model function calls in the controller statically such as:

$data = ModelName::functionName($param);

while it should be called dynamically such as:

$model = new Model();
$data = $model->functionName($param);

mostly all the calls are made statically. the code is working on the server and on their local machines except for mine. And the static calls are too many to fix without rewriting huge code base.

I always update my project via composer. My php version is 5.4.

anyone might know what this is about?Read more