Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#46952 closed defect (bug) (fixed)

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

Reported by: diddledani Owned by: SergeyBiryukov
Priority: normal Milestone: 5.2
Component: Site Health Version: 5.2
Severity: normal Keywords: site-health
Cc: Focuses: administration

Description

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.

https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/class-wp-site-health-auto-updates.php#L69

Change History (3)

#1 @SergeyBiryukov
7 years ago

  • Component GeneralAdministration
  • Focuses administration added
  • Keywords site-health added
  • Milestone Awaiting Review5.2

#2 @SergeyBiryukov
7 years ago

  • Owner set to SergeyBiryukov
  • Resolutionfixed
  • Status newclosed

In 45223:

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

Props diddledan.
Fixes #46952.

#3 @spacedmonkey
7 years ago

  • Component AdministrationSite Health
Note: See TracTickets for help on using tickets.