[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 22:40:04 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: has-patch | Focuses:
-----------------------------+------------------------
Comment (by joemcgill):
After more investigation, it looks like this issue existed prior to the
6.4 release cycle, and was previously reported in #59020. It's possible
this issue extends all the way back to WP version 6.0, when this was first
introduced in [53152].
I'll close that ticket as a duplicate if we decide to move forward with
this fix.
@rajinsharwar, to answer your question:
> Just a side query, why are we loading the patterns on the init instead
of after_theme_setup?
It's a good question...I'm not sure what the original rationale was for
choosing that hook. However, it this case it wouldn't matter because the
`after_theme_setup` hook fires before `init` in `wp-settings.php` and the
`functions.php` file would still not be loaded in this case, leading to
the same error.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59723#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list