• Resolved nachtigall

    (@nachtigall)


    In my log I get these messages on each request:

    PHP Notice: Constant WP_DEBUG already defined in /var/www/xxx/htdocs/wp-config.php on line 79

    Seems to be caused by this plugin. Commenting out the definition in wp-content/plugins/shariff/backend/index.php solves this notice:

    <?php
    // THIS NEEDS TO BE REMOVED TO AVOID:
    // define( 'WP_DEBUG', false );

    Can this be fixed?

    https://www.ads-software.com/plugins/shariff/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Jan-Peter

    (@starguide)

    There is a fix in the next release that takes care of the underlying issue. The backend (share counts) do not work, if WP_DEBUG is enabled. Setting WP_DEBUG to false will solve this issue. In order to still be able to test installations with a working backend the above line was set, causing a PHP notice, but that was better than a not working backend on test installations. WP_DEBUG should never be enabled on live systems.

    But like I said, I solved the original problem therefore the need for this is no longer present. The next release 2.4.0 will probably releases on Monday.

    JP

    Thread Starter nachtigall

    (@nachtigall)

    yep, just have it within an if check:

    // in pseudo code
    if WP_DEBUG is enabled:
     disable WP_DEBUG

    anyway, thanks for fixing ??

    Plugin Author Jan-Peter

    (@starguide)

    Well, that would only prevent the PHP notice, but the share counts wouldn’t work anymore as long as WP_DEBUG is true and therefore would make it hard to test anything with it. Like I said, the PHP notice was the smaller evil at this point. Anyways, will be all good on Monday. ??

    Thread Starter nachtigall

    (@nachtigall)

    the share counts wouldn’t work anymore as long as WP_DEBUG is true

    Then you would just check for this ??

    if ( defined( 'WP_DEBUG' ) && WP_DEBUG == true ) {
        // set to false
    }
    Plugin Author 3UU

    (@3uu)

    This suggestion is funny! Okay – sorry – only from programers point of view. WP_DEBUG is a so called constant. You can not change it later in a program. If you do it – you will get an error ??

    I have released 2.4.0 some minutes ago. It do no longer need the constant.

    I’m a “new” beginner to WP. Working with weaver II. Was setting up site (it was up-loaded, I could link to it on web) and was working on the parent-child functions.php and style.css files (following and inputting what I gleaned from WP Beginners site). I uploaded the weaver-ii-child folder and then got white screen of death (wsd). Removed the file but still wsd. On a help site I found and inserted (into the wp-config.php file an “error” reporting code and then on the wsd got this:
    Notice: Constant WP_DEBUG already defined in /homepages/17/d272894331/htdocs/clickandbuilds/WordPress/MyWordPress/wp-config.php on line 76

    Notice: Use of undefined constant RSHCP_DEBUG – assumed ‘RSHCP_DEBUG’ in /homepages/17/d272894331/htdocs/clickandbuilds/WordPress/MyWordPress/wp-content/plugins/rs-head-cleaner-lite/rs-head-cleaner-lite.php on line 104

    Parse error: syntax error, unexpected ‘}’ in /homepages/17/d272894331/htdocs/clickandbuilds/WordPress/MyWordPress/wp-content/themes/weaver-ii/functions.php on line 14

    Please, what do I do with this information?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘PHP notice: Constant WP_DEBUG already defined’ is closed to new replies.