The first param to get_site_url() should be a site ID, or null for the current site. Passing a string can cause a switch_to_blog( 0 ) in some circumstances. That breaks SQL queries because the table doesn't exist. The first broken query results in a wp_die(), but that leads to more queries which in turn call wp_die().
The first param to
get_site_url()
should be a site ID, ornull
for the current site. Passing a string can cause aswitch_to_blog( 0 )
in some circumstances. That breaks SQL queries because the table doesn't exist. The first broken query results in awp_die()
, but that leads to more queries which in turn callwp_die()
.Passing
null
fixes the error while preserving the original intent from https://github.com/WordPress/wporg-parent-2021/pull/54#discussion_r1025741781.I ran into this while trying to activate the parent theme on
events.wordpress.org
for https://github.com/WordPress/wordcamp.org/issues/1007