This topic was marked solved by its starter, on March 16th, 2013, 01:35 AM

live627

  • Should five per cent appear too small / Be thankful I don't take it all / 'Cause I'm the taxman, yeah I'm the taxman
  • Posts: 1,670
Error in wedit::add_button()
« on March 15th, 2013, 06:41 AM »
Using $this when not in object context in I:\www\wedge\trunk\Sources\Class-Editor.php on line 98
Posted: March 15th, 2013, 06:10 AM

I don't think it should be static.
A confident man keeps quiet.whereas a frightened man keeps talking, hiding his fear.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Error in wedit::add_button()
« Reply #1, on March 15th, 2013, 10:57 AM »
Indeed, you can simply remove the static keyword to fix this.
Thanks for the report. Good thing I've decided to let strict errors be reported, I really prefer having a 'clean' system.
I've double-checked all functions, and only add_button was incorrectly set as static while still referring to $this.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Error in wedit::add_button()
« Reply #2, on March 15th, 2013, 04:01 PM »
Especially since anything related to an editor instance will be a true method call to said instance... ;)
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Error in wedit::add_button()
« Reply #3, on March 15th, 2013, 04:12 PM »
I think it's the first time in two years I've seen you use a static keyword by mistake (and it was in rev 387, back in 2010!). It goes to say how good you've always been at understanding this whole thing ;)