• Resolved simonvw

    (@simonvw)


    Hi,

    Inside the method add_checkbox_auto_protect_file there should be an extra check if $screen is set.

    The method is checking if get_current_screen() exists but in case that screen.php is included elsewhere this check is not enough.

    Unfortunately this has led to a conflict with another plugin causing the following error: “Trying to get property ‘id’ of non-object”

    Is there anywhere I could open up a pull request?

    Adding the check isset($screen) inside add_checkbox_auto_protect_file would solve the problem:

    if (isset($screen) && 'media' === $screen->id && 'add' == $screen->action) {
    // 
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter simonvw

    (@simonvw)

    This ticket is for prevent-direct-access-gold

    mvdhoek1

    (@mvdhoek1)

    Currently we’re using a forked version of the plugin to make all functionalities work. A fix is really wanted ??

    Plugin Author BWPS Team

    (@buildwps)

    Hi @simonvw,

    Thank you for the advice.

    Following the review by our development team, we have confirmed that they will be updating the screen check method in the next PDA Gold version.

    Your information is much appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add check if global $current_screen is set’ is closed to new replies.