Closed zackkatz closed 2 years ago
In PHP 8.1, If a class is extended, static methods aren't inherited. In this case, the static $file_paths; definition isn't inherited.
static $file_paths;
class Example_Template extends Gamajo_Template_Loader {} class Example_Template_Two extends Example_Template {} $one = new Example_Template(); $two = new Example_Template_Two(); $two->plugin_template_directory = 'path-override' $one->locate_template(); // Paths are added, returns true $two->locate_template(); // New paths aren't added, returns false
I propose switching to a private property instead. PR incoming.
I'm sorry, this is not an issue with the current version. We're using 1.3.1 in our plugin but it doesn't match up with 1.3.1 here! Not sure exactly how that happened…
Anyway, thanks for this class!
In PHP 8.1, If a class is extended, static methods aren't inherited. In this case, the
static $file_paths;
definition isn't inherited.I propose switching to a private property instead. PR incoming.