• Resolved dashed-slug.net

    (@dashedslug)


    Hello,

    Awesome plugin, thanks! I want to report an issue that is not high priority, but more of an annoyance:

    Every time I use wp-cli I get this error:

    Notice: Undefined index: HTTP_HOST in /var/www/wordpress/wp-content/plugins/wp-fastest-cache/inc/cache.php on line 321

    Some of the values in the $_SERVER superglobal are not defined when you run WordPress from the shell. A guard clause would fix this.

    with regards
    Alex

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Emre Vona

    (@emrevona)

    what kind of command did you execute on wp-cli?

    Thread Starter dashed-slug.net

    (@dashedslug)

    Any command triggers it. For example I use wp option update a lot in my test automation, and the warnings fill up my screen. I have added some @ symbols in the plugin to circumvent this for now. The code does not check if the values in $_SERVER exist before using them.

    Perhaps some logic is needed to not run the cache mechanism at all when WordPress is called from the CLI.

    Plugin Author Emre Vona

    (@emrevona)

    Can you contact me via email please: https://www.wpfastestcache.com/contact-us/

    Hi, I am having the same issue.

    $ wp plugin list
    PHP Notice: Undefined index: HTTP_HOST in /home/chd/sites/main/web/app/plugins/wp-fastest-cache/inc/cache.php on line 321
    Notice: Undefined index: HTTP_HOST in /home/chd/sites/main/web/app/plugins/wp-fastest-cache/inc/cache.php on line 321

    Thread Starter dashed-slug.net

    (@dashedslug)

    Thank you @emrevona for looking into this issue and for providing a fix. I am closing this thread.

    @swarshaw I’m guessing the fix will be pushed out in the next release of the plugin, now that it’s in trunk.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Warnings shown in wp-cli’ is closed to new replies.