[wp-trac] [WordPress Trac] #44429: WP-CLI incompatibility with wp_redirect( https://... )
WordPress Trac
noreply at wordpress.org
Fri Jun 22 15:36:21 UTC 2018
#44429: WP-CLI incompatibility with wp_redirect( https://... )
------------------------------------------------+--------------------------
Reporter: ecahost7 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
| Review
Component: General | Version:
Severity: major | Resolution:
Keywords: dev-feedback has-patch 2nd-opinion | Focuses:
------------------------------------------------+--------------------------
Comment (by schlessera):
@afragen I'd say it is actually an issue in the plugin that causes the
redirect. Basically, the plugin does a "web-request-only" operation when
it is not actually dealing with a web request.
That being said, there's a general assumption with WordPress that the code
is only ever run in a web server context, so it is an easy trap for plugin
developers to fall into... which means it might make sense to fix it from
within Core.
However, if this is to be fixed in Core, I would suggest fixing it in a
more general way by checking for the `cli` SAPI, not for WP-CLI
specifically.
I have to admit that I ignore what the possible combinations of use cases
vs environments are, though, so I'm a bit worried we will just break
something else in the process.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44429#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list