[1.8.5] PHP Error: Using $this when not in object context

Locked
naitsirch
User
Posts:7
Joined:Wed Aug 19, 2009 6:43 am
Are you a spambot?:no
Location:Paderborn/Germany
[1.8.5] PHP Error: Using $this when not in object context

Post by naitsirch » Thu May 26, 2011 7:56 am

Hi,

I got the PHP error "Using $this when not in object context" in file module.tag.id3v2.php on line 3165.

Code: Select all

static function IsValidDateStampString($datestamp) {
    if (strlen($datestamp) != 8) {
        return false;
    }
    if (!$this->IsANumber($datestamp, false)) {
        return false;
    }
    [...]
}
This is wrong because it's a static method. To fix the problem just use "self::IsANumber" instead of $this->IsANumber.

Thanks

James Heinrich
getID3() v1 developer
Posts:1477
Joined:Fri May 04, 2001 4:00 pm
Are you a spambot?:no
Location:Northern Ontario, Canada
Contact:

Re: [1.8.5] PHP Error: Using $this when not in object contex

Post by James Heinrich » Thu May 26, 2011 10:21 am

Thanks. Fixed in v1.9.0

Locked