Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only silence REST errors if the REST server is added (#10903)
* Only silence REST errors if the REST server is added If the REST server is not available in a code run, Gutenberg will fatal with `Fatal error: Uncaught Error: Call to undefined function gutenberg_silence_rest_errors()` `gutenberg_silence_rest_errors` is defined in `lib/rest-api.php`, which is only loaded if `class_exists( 'WP_REST_Controller' )` in `load.php`. This PR adds the same `class_exists()` test to the call to `gutenberg_silence_rest_errors()` in `gutenberg.php`.
- Loading branch information