wordpress-develop/tests
Joe McGill ea30b5d8eb Upgrade/Install: Skip registering theme block patterns during the upgrade process.
This fixes a bug during the database upgrade process where a theme's `functions.php` file may not be loaded, leading to potential exceptions if the theme's pattern files use symbols (classes, functions, constants, etc.) that are declared only when the `functions.php` file is loaded. To do so, a check for `wp_get_active_and_valid_themes()` is added early to `_register_theme_block_patterns()`, which returns early if no active or valid themes are returned.

Props fabiankaegy, rajinsharwar, pbiron, huzaifaalmesbah, hellofromTonya, peterwilsoncc, joemcgill.
Fixes #59723.


git-svn-id: https://develop.svn.wordpress.org/trunk@57021 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-27 19:02:54 +00:00
..
e2e Options, Meta APIs: Prevent saving of invalid timezones. 2023-10-16 23:49:10 +00:00
gutenberg Block Editor: Update the Gutenberg branch used to launch Gutenberg e2e tests. 2021-06-01 09:21:36 +00:00
performance Build/Test Tools: Do not round percentages when comparing performance test results. 2023-10-13 20:03:07 +00:00
phpunit Upgrade/Install: Skip registering theme block patterns during the upgrade process. 2023-10-27 19:02:54 +00:00
qunit REST API: Fix issue with Template and Template Part Revision/Autosave REST API controllers. 2023-10-10 14:03:03 +00:00
visual-regression Build/Test Tools: Migrate Puppeteer tests to Playwright. 2023-10-13 08:11:41 +00:00