Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #47266


Ignore:
Timestamp:
05/14/2019 06:22:19 PM (7 years ago)
Author:
ocean90
Comment:

An alternative would be to add a wp_die handler for CLI context.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #47266

    • Property Keywords servehappy added; site-health removed
    • Property Summary changed from Site health template should not be displayed for CLI scripts to Template of shutdown handler for fatal errors should not be displayed for CLI scripts
  • Ticket #47266 – Description

    initial v1  
    11When running a CLI script that has a syntax error, the template's raw HTML and CSS are output to the command line.
    22
    3 I don't think that the Site Health feature should be loaded in a CLI context; instead, the default PHP behavior should be used instead.
     3I don't think that the shutdown handler for fatal errors should be loaded in a CLI context; instead, the default PHP behavior should be used instead.
    44
    55This should handle the case where the CLI script is being run through WP-CLI, and also older scripts that were built before WP-CLI existed, which just load WP manually (i.e., check `'cli' === php_sapi_name()` rather than `defined( 'WP_CLI' )` ).