Wedge

Public area => Bug reports => The Pub => Archived fixes => Topic started by: live627 on March 15th, 2013, 06:41 AM

Title: Error in wedit::add_button()
Post by: live627 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.
Title: Re: Error in wedit::add_button()
Post by: Nao 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.
Title: Re: Error in wedit::add_button()
Post by: Arantor on March 15th, 2013, 04:01 PM
Especially since anything related to an editor instance will be a true method call to said instance... ;)
Title: Re: Error in wedit::add_button()
Post by: Nao 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 ;)