Skip to content
Advertisement

Deprecated: Non-static method AriKernel::init() should not be called statically in

My server team showed me the following error log.

Deprecated: Non-static method AriKernel::init() should not be called statically in /home/domain/public_html/modules/mod_ariimageslider/mod_ariimageslider/kernel/class.AriKernel.php on line 103

Line 103 AriKernel::init();

I searched on google but I didn’t find any solution. There is almost 100+ same deprecation error. Any help would be appreciated.

Thanks in advance

Advertisement

Answer

We don’t know your class’ code, however rule is simple, most of contemporary IDEs will allow you to choose only methods of proper types while typing:

<?php

class MyClass
{
    public static function myStaticMethod()
    {
        echo 'This is static method';
    }

    public function myNONStaticMethod()
    {
        echo 'This is NON-static method';
    }
}

// call of static method
MyClass::myStaticMethod();

// call of NON static method
$object = new MyClass();
$object->myNONStaticMethod();
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement