• Resolved getmobileedge

    (@getmobileedge)


    Hello, this plugin seems to have php warnings / info turned on by default so when I activate the plugin it shows all errors on the front end website. Is there any way I can turn off debug in this plugin so all these errors do not show?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Please provide a screenshot, so we can guide you better.

    • This reply was modified 6 years, 5 months ago by raissufyan.
    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    @getmobileedge make sure that your wp-config.php is already set with WP_DEBUG false. Because this plugin has no error_reporting thing ON.

    Thread Starter getmobileedge

    (@getmobileedge)

    @fahadmahmood yes, wp-config.php has WP_DEBUG false. However, I just looked through your plugin code and lines 24-26 (index.php) have these:

    if ( ! defined( ‘ABSPATH’ ) ) {
    exit; // Exit if accessed directly
    }else{
    clearstatcache();
    }
    //return;

    ini_set(‘display_errors’, 1);
    ini_set(‘display_startup_errors’, 1);
    error_reporting(E_ALL);

    require_once(ABSPATH . ‘wp-admin/includes/upgrade.php’);

    That is what is showing the errors on the site. I have commented out those lines and the errors have disappeared.

    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    @getmobileedge please update the version and try again, i have made these three lines conditional with WP_DEBUG constant.

    Thread Starter getmobileedge

    (@getmobileedge)

    @fahadmahmood perfect! Thanks for the update, and the extremely speedy response, all good now with v3.0.7!

    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    thank you @getmobileedge

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘How to turn off php warnings in plugin?’ is closed to new replies.