WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#6668 closed defect (bug) (fixed)

wp_just_in_time_script_localization throws a notice when WP_DEBUG is defined

Reported by: simonwheatley Owned by:
Milestone: 2.5.1 Priority: normal
Severity: normal Version: 2.5
Component: General Keywords: has-patch needs-testing 2nd-opinion
Focuses: Cc:

Description

Steps to reproduce:

  1. Define the constant WP_DEBUG in wp_config.php
  1. Browse to the blog homepage of a fairly vanilla WP2.5 install
  1. Check the PHP error log, and you should see:

Use of undefined constant AUTOSAVE_INTERVAL - assumed 'AUTOSAVE_INTERVAL' in /Users/simon/Projects/WordPress-2.5/site/wp-includes/script-loader.php:497

Looking around, it seems sensible to define AUTOSAVE_INTERVAL in one place, further up the hierachy where it will be present by the time wp_just_in_time_script_localization is called. wp_settings.php contains similar Constant defines, so I've put it there.

Attachments (1)

constant_autosave_interval_moved.patch (993 bytes) - added by simonwheatley 6 years ago.
Move constant AUTOSAVE_INTERVAL to wp_settings.php

Download all attachments as: .zip

Change History (3)

simonwheatley6 years ago

Move constant AUTOSAVE_INTERVAL to wp_settings.php

comment:1 ryan6 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [7663]) Move define of AUTOSAVE_INTERVAL to wp-settings so that it is available earlier. Props simonwheatley. fixes #6668 for 2.5

comment:2 ryan6 years ago

(In [7664]) Move define of AUTOSAVE_INTERVAL to wp-settings so that it is available earlier. Props simonwheatley. fixes #6668 for trunk

Note: See TracTickets for help on using tickets.