Skip to content

Commit

Permalink
Avoid querying block templates during installation (#44584)
Browse files Browse the repository at this point in the history
The database tables don't yet exist.
  • Loading branch information
danielbachhuber authored Oct 7, 2022
1 parent 8ed501d commit 8bfea7f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/block-library/src/template-part/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ function build_template_part_block_area_variations() {
* @return array Array containing the block variation objects.
*/
function build_template_part_block_instance_variations() {
// Block themes are unavailable during installation.
if ( wp_installing() ) {
return array();
}
$variations = array();
$template_parts = get_block_templates(
array(
Expand Down

0 comments on commit 8bfea7f

Please sign in to comment.