PHP Notices in WP-CLI
-
When attempting to run WP-CLI commands on a site that has this plugin installed, the following PHP notice appears:
Undefined index: HTTP_HOST in public_html/wp-content/plugins/simple-301-redirects/wp-simple-301-redirects.php on line 271
Based on this, the plugin should probably either account for when
HTTP_HOST
is not set, or should be able to detect whether WP-CLI is in use and respond accordingly.Here’s an example of detecting WP-CLI usage: https://github.com/wp-cli/wp-cli/issues/4073#issuecomment-302412853
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘PHP Notices in WP-CLI’ is closed to new replies.