Support » Plugin: Plugin Organizer » Errors with latest WP version

  • Hello there,

    We were doing some verification with our hosting provider (WPEngine) and it came to their attention that PluginOrganizer had some issues with the HTTP_HOST variable.

    We have added the definition in the wp-config file but it still gives these notices:

    Notice: Undefined index: HTTP_HOST in /nas/content/live/nationhats/wp-content/mu-plugins/PluginOrganizerMU.class.php on line 439
    Notice: Undefined index: HTTP_HOST in /nas/content/live/nationhats/wp-content/mu-plugins/PluginOrganizerMU.class.php on line 165

Viewing 3 replies - 1 through 3 (of 3 total)
  • Defining these in wp-config.php doesn’t make sense.

    It checks for $_SERVER['HTTP_HOST'] which doesn’t exist in a CLI environment. (I’m assuming these notices occur when running a cron via php cli / wp-cli commands)

    Plugin developer should check if the $_SERVER[‘HTTP_HOST’] is set before using it.
    if(isset($_SERVER['HTTP_HOST'])) { ... }

    • This reply was modified 5 months, 2 weeks ago by Pratham.

    @pratham2003 thanks for your input. I meant that WPEngine did add the HTTP_HOST reference but apparently it did not fix the issue.

    I assumed this was done in wp-config but it’s probably at the server level. To be honest I’m not sure, we were doing some verification and this came to our attention.

    Plugin Author Jeff Sterup

    (@foomagoo)

    If your server does not set the HTTP_HOST index of the $_SERVER variable then this plugin will not work.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.