php - Fatal error: Uncaught Error: Using $this when not in object context -
this question has answer here:
class affiliates_shortcodes { private $earnings; public static function affiliates_user_tree() { echo $this->earnings; } } getting error:
fatal error: uncaught error: using $this when not in object context
your method declared static. can't use object properties within static methods. see http://php.net/manual/en/language.oop5.static.php
Comments
Post a Comment