7

I'm getting this error at the top of my wordpress site:

Notice: Use of undefined constant SCRIPT_DEBUG - assumed 'SCRIPT_DEBUG' in /[wordpress path]/wp-includes/formatting.php on line 4144

No idea where it came from, any ideas what started causing this?

Using version 4.2.1

  • What version of Wordpress are you using? 4.2.1? – Frederik Spang Apr 30 '15 at 10:36
5

This is a known bug

As far as I'm concerned, you can easily fix it by replacing

if ( SCRIPT_DEBUG ) {

with

if ( defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ) {

That should suppress the error for now.

When Wordpress is updated again, this error may be overwritten, but I believe it will be fixed in the next update.

UPDATE

Fixed at build 32482.

5

If you don't wish to modify your core wordpress files to fix the issue, you can simply add the missing definition into your wp.config.php file.

Something like: define('SCRIPT_DEBUG', true);

Would remove the error.

There is already a WP_DEBUG definition in there already so I would suggest putting it close to that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.