Make WordPress Core

Opened 14 months ago

Closed 14 months ago

Last modified 11 months 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: Site Health 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 (3)

#1 @SergeyBiryukov
14 months ago

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

#2 @SergeyBiryukov
14 months 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.

#3 @spacedmonkey
11 months ago

  • Component changed from Administration to Site Health
Note: See TracTickets for help on using tickets.