• The error message is this:

    Function name, class name, namespace name or constant name can not be reserved keyword '__dir__'

    Referring to the line that looks like this;

    if(defined('__DIR__')) { define('WPS_PLUGIN_BASE_NAME', basename(__DIR__)); }

    As you can see the __DIR__ keyword is not being used as a class, namespace, nor a constant name but merely being checked if it just exists.

    Unless i am misunderstanding that seems to be a bug in your plugin.

    https://www.ads-software.com/plugins/php-compatibility-checker/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Jason Stallings

    (@octalmage)

    Hi Kimberly!

    This looks like a false positive, could you try the latest version of the plugin (1.2.0)?

    Thanks!

    Sa?a

    (@stodorovic)

    Hi,

    it seems that this code is recognized as incompatible:

    // Backwards compatibility for older than PHP 5.3.0
    if ( !defined( ‘__DIR__’ ) ) {
    define( ‘__DIR__’, dirname( __FILE__ ) );
    }

    I’m not sure, I just found an case. Basically, WP works at PHP 5.2 which needs it.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘BUG? – Claims reserved keyword __dir__ being used when its not’ is closed to new replies.