Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#46325 closed defect (bug) (duplicate)

wp 5.1 broke some themes working perfectly before, cause found

Reported by: bufny's profile bufny Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.1
Component: General Keywords:
Focuses: Cc:

Description

In wp-settings.php from wp5.1 there are the following lines of code (not present before):

<?php

// Load the functions for the active theme, for both parent and child theme if applicable.
foreach ( wp_get_active_and_valid_themes() as $theme ) {
        if ( file_exists( $theme . '/functions.php' ) ) {
                include $theme . '/functions.php';
        }
}
unset( $theme );

If the active theme is using the $theme as a global variable things mess up. I don't know who should refactor this (the wp core team or the hundreds theme creators), but the name of the variable here is unfortunately chosen.

Change History (4)

#1 @bufny
6 years ago

  • Summary changed from wp 5.1 brake some themes working perfectly before, cause found to wp 5.1 broke some themes working perfectly before, cause found

#2 @TimothyBlynJacobs
6 years ago

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

Thank you for the report bufny, we're already tracking this issue in #46313

This ticket was mentioned in Slack in #forums by tobifjellner. View the logs.


6 years ago

#4 @desrosj
6 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.