Closed TobiasBg closed 10 years ago
The __DIR__ constant has only been added in PHP 5.3.0 and should therefore not be used e.g. in https://github.com/tommcfarlin/WordPress-Plugin-Boilerplate/blob/master/plugin-name/admin/class-plugin-name-admin.php#L80 as WordPress still supports PHP 5.2.4, and plugins should too.
__DIR__
The fix is as easy as replacing that with dirname( __FILE__ ).
dirname( __FILE__ )
It has been discussed here https://github.com/tommcfarlin/WordPress-Plugin-Boilerplate/issues/137
Closing this ticket as it's discussed in #137 (ht @grappler).
The
__DIR__
constant has only been added in PHP 5.3.0 and should therefore not be used e.g. in https://github.com/tommcfarlin/WordPress-Plugin-Boilerplate/blob/master/plugin-name/admin/class-plugin-name-admin.php#L80 as WordPress still supports PHP 5.2.4, and plugins should too.The fix is as easy as replacing that with
dirname( __FILE__ )
.