Deprecated: Non static Method

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Thu Oct 22, 2015 5:58 pm
Reply with quote
Report this post
Hello,

I have installed the Publisher Template using the Quickstart zip file and the website keeps showing various Deprecated: Non static Method issues..

Deprecated: Non-static method NSP_GK4_Utils::cutText() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\quickstart\modules\mod_news_pro_gk4\tmpl\layout.parts.php on line 200

Deprecated: Non-static method NSP_GK4_Thumbs::createThumbnail() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\quickstart\modules\mod_news_pro_gk4\tmpl\layout.parts.php on line 304

Deprecated: Non-static method NSP_GK4_Thumbs::checkSpecialImages() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\quickstart\modules\mod_news_pro_gk4\gk_classes\gk.thumbs.php on line 127

Deprecated: Non-static method NSP_GK4_Thumbs::translateName() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\quickstart\modules\mod_news_pro_gk4\gk_classes\gk.thumbs.php on line 127

And various other..

What could be the reason why the Quickstart install is showing these issues?

Thank you
User avatar
Fresh Boarder

GK User
Sat Oct 24, 2015 11:21 am
Reply with quote
Report this post
User avatar
Moderator

GK User
Sun Feb 07, 2016 12:37 pm
Reply with quote
Report this post
just go to template index and change

// enable showing errors in PHP
ini_set('display_errors','On');

to
ini_set('display_errors','Off');

worked nice for me.
User avatar
Fresh Boarder

GK User
Wed Jul 06, 2016 9:49 am
Reply with quote
Report this post
me too. Problem solved!!
User avatar
Fresh Boarder

GK User
Wed Mar 08, 2017 12:41 pm
Reply with quote
Report this post
Those are not real fixes, they just mask the errors.
I got a simular error:
Deprecated: Non-static method GKIS_gk_rockwall_Model::getDataK2() should not be called statically in \modules\mod_image_show_gk4\styles\gk_rockwall\controller.php on line 85

Real fix was to look-up the function called on line 85 of controller.php and find the file where this function is located, which in this case was in \modules\mod_image_show_gk4\styles\gk_rockwall\model.php

Altering lines 28 and 65 from:
function getData($ids) {
function getDataK2($ids) {
to
public static function getData($ids) {
public static function getDataK2($ids) {
fixed the problem instead of masking the problem.

Hope this helps.

-XiP
User avatar
Junior Boarder


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.