Frontend crash in get_rest_url
mundschenk-at opened this issue · comments
After installing Mercator, the frontend of one of my sites (haven't checkt the others) crashes with the following stack trace:
Fatal error: Uncaught Error: Call to a member function using_index_permalinks() on null in /path/wordpressmu/wp-includes/rest-api.php:314 Stack trace: #0 /path/wordpressmu/wp-includes/rest-api.php(363): get_rest_url(NULL, '/', 'json') #1 /path/wordpressmu/wp-content/mu-plugins/mercator-redirect/redirect.php(64): rest_url() #2 /path/wordpressmu/wp-includes/class-wp-hook.php(298): Mercator\Redirect\handle_redirect('') #3 /path/wordpressmu/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array) #4 /path/wordpressmu/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #5 /path/wordpressmu/wp-settings.php(326): do_action('plugins_loaded') #6 /path/wordpressmu/wp-config.php(226): require_once('/www/vhosts/wor...') #7 /path/wordpressmu/wp-load.php(37): require_once('/www/vhosts/wor...') #8 /path/wordpressmu/wp-blog-header.php(13): require_once('/www/vhosts/wor...') #9 /path/wordpressmu/index.php(17): require('/www/vhosts/wor...') #10 {main} thr in /path/wordpressmu/wp-includes/rest-api.php on line 314
It looks like global $wp_rewrite;
is null at that point.
Looks like this is specific to the redirect plugin so I've moved the issue there: