Make WordPress Core

Opened 5 weeks ago

Closed 5 weeks ago

#46952 closed defect (bug) (fixed)

$allowed_constants is not defined in class-wp-site-health-auto-updates.php

Reported by: diddledan Owned by: SergeyBiryukov
Milestone: 5.2 Priority: normal
Severity: normal Version: 5.2
Component: Administration Keywords: site-health
Focuses: administration Cc:


In the file wp-admin/includes/class-wp-site-health-auto-updates.php line 69 a test is made against the variable $allowed_constants which is guaranteed to be undefined because it is not set within the function nor is it pulled via global. This is the only reference within the entire WordPress source code to a variable with this name, so even if we add global it will still be undefined unless a plugin or theme defines it.


Change History (2)

#1 @SergeyBiryukov
5 weeks ago

  • Component changed from General to Administration
  • Focuses administration added
  • Keywords site-health added
  • Milestone changed from Awaiting Review to 5.2

#2 @SergeyBiryukov
5 weeks ago

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

In 45223:

Site Health: Remove reference to an undefined variable in WP_Site_Health_Auto_Updates::test_constants().

Props diddledan.
Fixes #46952.

Note: See TracTickets for help on using tickets.