• Resolved erdalaltin

    (@erdalaltin)


    Hi;

    wordpress 5.2.3
    easy watermark 1.0.2

    [13-Sep-2019 06:00:21 UTC] PHP Fatal error: Uncaught Error: Call to undefined function EasyWatermark\Features\get_current_screen() in E:\htdocs\motosikletevi\wp-content\plugins\easy-watermark\src\classes\Features\AutoWatermarkSwitch.php:36
    Stack trace:
    #0 E:\htdocs\motosikletevi\wp-includes\class-wp-hook.php(284): EasyWatermark\Features\AutoWatermarkSwitch->pre_plupload_upload_ui()
    #1 E:\htdocs\motosikletevi\wp-includes\class-wp-hook.php(310): WP_Hook->apply_filters(”, Array)
    #2 E:\htdocs\motosikletevi\wp-includes\plugin.php(465): WP_Hook->do_action(Array)
    #3 E:\htdocs\motosikletevi\wp-includes\media-template.php(250): do_action(‘pre-plupload-up…’)
    #4 E:\htdocs\motosikletevi\wp-includes\class-wp-hook.php(286): wp_print_media_templates(”)
    #5 E:\htdocs\motosikletevi\wp-includes\class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
    #6 E:\htdocs\motosikletevi\wp-includes\plugin.php(465): WP_Hook->do_action(Array)
    #7 E:\htdocs\motosikletevi\wp-includes\general-template.php(2761): do_action(‘wp_footer’)
    #8 E:\htdocs\motosikletevi\wp-content\themes\ in E:\htdocs\motosikletevi\wp-content\plugins\easy-watermark\src\classes\Features\AutoWatermarkSwitch.php on line 36

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter erdalaltin

    (@erdalaltin)

    I added require_once( ABSPATH . ‘wp-admin/includes/screen.php’ ); in E:\htdocs\motosikletevi\wp-content\plugins\easy-watermark\src\bootstrap.php line:26 and solved the problem.

    but

    I had new problem [13-Sep-2019 08:25:07 UTC] PHP Notice: Trying to get property ‘id’ of non-object in E:\htdocs\motosikletevi\wp-content\plugins\easy-watermark\src\classes\Features\AutoWatermarkSwitch.php on line 36

    I changed to if ( !empty(get_current_screen()->id) && ‘media’ !== get_current_screen()->id ) in E:\htdocs\motosikletevi\wp-content\plugins\easy-watermark\src\classes\Features\AutoWatermarkSwitch.php line:36 and solved the problem.

    Plugin Author Kuba Mikita

    (@kubitomakita)

    Hi @erdalaltin thanks for reporting this!

    We fixed this issue and it has been released in version 1.0.3

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘get_current_screen()’ is closed to new replies.