非静态方法tNG_log :: log()不应该静态调用,假设来自不兼容的上下文的$ this

I am getting the above error - here is the code that it is referring to:

function executeTransaction() {
        tNG_log::log('tNG' . $this->transactionType, 'executeTransaction', 'begin');
        if ($this->started) {
            tNG_log::log('tNG' . $this->transactionType, 'executeTransaction', 'end');
            return false;
        }

I am unsure how to edit the above code effectively to make the error message go away. I am aware that I can edit the php.ini file so that these errors do not show, however I would rather fix the code

The method log() of the class tNG_log() is not defined as a static function. Static methods can be called without creating an object from the class, like in your example, class::staticFunction(). This only works when in the class, the code is something like:

class tNG_log {
    public static function log(...) {
        // ...
    }
}

Assuming the tNG_log-code is correct and should not be called staticly, the solution is to create an object from the class:

$tnglog = new tNG_log();
$tnglog->log(...);

If you want more information, please start with reading http://php.net/manual/en/language.oop5.static.php