Support » Plugin: Admin Menu Editor » PHP 7: Warning … in shadow_plugin_framework.php on line 315

  • vpsolatov

    (@vpsolatov)


    Hi!
    After plugin installation and activation I see:

    Warning: mb_strpos(): Empty delimiter in Z:\home\andreiclub.ru\www\wp-content\plugins\admin-menu-editor\includes\shadow_plugin_framework.php on line 315

    Quick investigation shows that ‘realpath(WPMU_PLUGIN_DIR)’ returns bool(false) (??), so realpath(WPMU_PLUGIN_DIR) is empty, and so PHP 7 show warning showed above.

    Inserting next code (just before final ‘return’) remove this trouble:

    $realpath_of_WPMU_PLUGIN_DIR = realpath(WPMU_PLUGIN_DIR);
    if( empty($realpath_of_WPMU_PLUGIN_DIR) )
    return false;

    But may be author will prefer to make another solution?!

    Sincerely,
    Viatcheslav.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Janis Elsts

    (@whiteshadow)

    Thank you for the report. I’m not sure why realpath() returns false in this case. It might mean that the mu-plugins directory doesn’t exist, or that it doesn’t have the right permissions for WordPress plugins to be able to read it.

    I’ll add a fix similar to what you suggested. It will be included in the next plugin release.

    vpsolatov

    (@vpsolatov)

    PHP 7.1.8

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP 7: Warning … in shadow_plugin_framework.php on line 315’ is closed to new replies.