• Since my hosting service upgraded to PHP version 7.2 my theme (Magazine Premium) was throwing a warning message. Even though I had define (‘WP_DEBUG’, false) set to off. I found some code on another forum that fixed the problem. The following code should replace define (‘WP_DEBUG’, false) in WP-config.php

    ini_set(‘display_errors’,’Off’);
    ini_set(‘error_reporting’, E_ALL );
    define(‘WP_DEBUG’, false);
    define(‘WP_DEBUG_DISPLAY’, false);

    I must apologize in advance if I have posted this in the wrong place or stepped on any posting rules. This site is so large I’ll be dead before I fully understand it’s forum structure
    .

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    This is host dependent, so no general fix is needed.

    Thread Starter amcgall

    (@amcgall)

    What do you mean by “host dependent”? Don’t most hosts attempt to use newer version of PHP? It seems to me that as time goes by this will not be host dependent.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    No, I mean usually only setting wp_debug to false is necessary.

    Thread Starter amcgall

    (@amcgall)

    Well, in this case setting wp_debug to false did not work. PHP warning messages were clearly visible on my website. But only after updating to PHP 7.2.

    I’m very fortunate using the alternative method worked.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘define (‘WP_DEBUG’, false) not working — a fix’ is closed to new replies.