#46325 closed defect (bug) (duplicate)
wp 5.1 broke some themes working perfectly before, cause found
Reported by: |
|
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)
Note: See
TracTickets for help on using
tickets.
Thank you for the report bufny, we're already tracking this issue in #46313