[wp-trac] [WordPress Trac] #59723: Pattern file containing PHP constant from theme causes fatal error on update to WordPress 6.4
WordPress Trac
noreply at wordpress.org
Tue Oct 24 21:59:14 UTC 2023
#59723: Pattern file containing PHP constant from theme causes fatal error on
update to WordPress 6.4
-----------------------------+------------------------
Reporter: fabiankaegy | Owner: joemcgill
Type: defect (bug) | Status: accepted
Priority: high | Milestone: 6.4
Component: Upgrade/Install | Version: trunk
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
-----------------------------+------------------------
Changes (by joemcgill):
* keywords: => needs-patch
* priority: normal => high
* status: reviewing => accepted
* milestone: Awaiting Review => 6.4
Comment:
Thanks, @fabiankaegy. It looks like what is happening here is that the
first time `wp_get_active_and_valid_themes()` is run one the upgrade page,
via [https://github.com/WordPress/wordpress-develop/blob/6.4/src/wp-
settings.php#L609 this line], the function returns an empty array, which
means the functions file isn't included.
Patterns are registered on `init` and do not include a check for whether
the functions file has already been loaded, but we should probably add an
extra check here, so patterns aren't loaded whenever `wp_installing()`
returns true.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59723#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list