Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only silence REST errors if the REST server is added #10903

Merged
merged 2 commits into from
Oct 23, 2018

Commits on Oct 22, 2018

  1. 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`.
    George Hotelling committed Oct 22, 2018
    Configuration menu
    Copy the full SHA
    8abd063 View commit details
    Browse the repository at this point in the history
  2. Simplify conditional to avoid duplication

    George Hotelling committed Oct 22, 2018
    Configuration menu
    Copy the full SHA
    5cd7dec View commit details
    Browse the repository at this point in the history