Make WordPress Core

Opened 8 weeks ago

Closed 8 weeks ago

#50793 closed defect (bug) (fixed)

Site Health: Incorrect file path in require_once

Reported by: dd32 Owned by: whyisjake
Milestone: 5.5 Priority: normal
Severity: normal Version: 5.5
Component: Site Health Keywords: has-patch
Focuses: Cc:


While looking through Site Health, I noticed that there's a require_once which includes a typo in a filename.
My guess is that this require_once isn't actually required here, as otherwise this should've been noticed already, but since there's no harm in including it, might as well fix the typo to avoid a potential fatal error.

  • src/wp-admin/includes/class-wp-site-health-auto-updates.php

    diff --git a/src/wp-admin/includes/class-wp-site-health-auto-updates.php b/src/wp-admin/includes/class-wp-site-health-auto-updates.php
    index b713404e4d..a7ebf07d49 100644
    a b class WP_Site_Health_Auto_Updates { 
    167167        */
    168168       public function test_wp_automatic_updates_disabled() {
    169169               if ( ! class_exists( 'WP_Automatic_Updater' ) ) {
    170                        require_once ABSPATH . 'wp-admin/includes/class-wp-automatic-updates.php';
     170                       require_once ABSPATH . 'wp-admin/includes/class-wp-automatic-updater.php';
    171171               }
    173173               $auto_updates = new WP_Automatic_Updater();

Change History (2)

#1 @whyisjake
8 weeks ago

  • Owner set to whyisjake
  • Status changed from new to accepted

#2 @whyisjake
8 weeks ago

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

In 48655:

Site Health: Incorrect file path in require_once.

Ensure that background updater can be loaded for testing to see if auto-updates can enable automatic updates.

Fixes #50793.
Props dd32.

Note: See TracTickets for help on using tickets.