• Resolved daleharrison

    (@daleharrison)


    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)
  • Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    Hi @daleharrison,

    Really Simple SSL takes this possibility into account, but apparently WP Simple 301 redirects does not, which is where the php notice is coming from.

    I’d recommend to contact the author of this redirect plugin.

    Let me know if you have any questions.

    Thread Starter daleharrison

    (@daleharrison)

    My apologies, I got my “Simple” plugin wires crossed as I am using both yours and theirs.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP Notices in WP-CLI’ is closed to new replies.