[wp-trac] [WordPress Trac] #47266: Site health template should not be displayed for CLI scripts
WordPress Trac
noreply at wordpress.org
Tue May 14 17:27:13 UTC 2019
#47266: Site health template should not be displayed for CLI scripts
----------------------------+-----------------------------
Reporter: iandunn | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Administration | Version: 5.2
Severity: normal | Keywords: site-health
Focuses: |
----------------------------+-----------------------------
When running a CLI script that has a syntax error, the template's raw HTML
and CSS are output to the command line.
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.
This 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' )` ).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47266>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list