• Resolved Compute

    (@compute)


    Hi, I’m getting a notice here:

    Line 119

    // Build a varniship
    if ( !defined( 'VHP_VARNISH_IP' ) && VHP_VARNISH_IP ) {

    I dont know why you have to check if the VHP_VARNISH_IP is not defined and it exists. You should consider doing it the other way:

    if ( defined( 'VHP_VARNISH_IP' ) && VHP_VARNISH_IP ) {
        $varniship = VHP_VARNISH_IP;
    } else {
        $varniship = get_option('vhp_varnish_ip');
    }

    https://www.ads-software.com/plugins/varnish-http-purge/

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Contributor Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    What notice? Not that you’re wrong, I just didn’t get one on a check.

    https://www.ads-software.com/support/topic/patch-a-little-patch-to-purge-on-comment-posting?replies=10 is where we came up with it.

    Thread Starter Compute

    (@compute)

    Try check your error logs. I actually got the notice when I used a die() just before the wp_remote_request().

    Plugin Contributor Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    What notice are YOU getting, though? ??

    The reason to check is that there are two ways to define the Varnish IP

    1) define it in wp-config

    2) set an option

    So that checks “If there isn’t a define but there IS a Varnish IP in the options table, use that. Otherwise use the define.”

    Or at least that’s what it should do.

    Thread Starter Compute

    (@compute)

    Use of undefined constant VHP_VARNISH_IP - assumed 'VHP_VARNISH_IP' in ..../wp-content/plugins/varnish-http-purge/varnish-http-purge.php on line 119

    Plugin Contributor Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    I don’t get that error at all in my logs nor on my site with wp-debug on.

    Did you set VHP_VARNISH_IP anywhere?

    Also what version of PHP are you using, and what version of the plugin?

    Thread Starter Compute

    (@compute)

    I did not set the VHP_VARNISH_IP anywhere.

    Newest version of the plugin and PHP 5.2

    Plugin Contributor Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Can you try using PHP 5.3?

    I’m going to try and roll back to 5.2 and see if that reproduces it.

    Thread Starter Compute

    (@compute)

    Well I think its more this line that conserns me:
    if ( !defined( 'VHP_VARNISH_IP' ) && VHP_VARNISH_IP ) {

    If its not defined and VHP_VARNISH_IP is true.

    Thread Starter Compute

    (@compute)

    VHP_VARNISH_IP will never be true if its not defined.

    Plugin Contributor Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    No, I believe you, and I’m poking at it. I’m just really confused by the fact that it won’t throw an error for me!

    Thread Starter Compute

    (@compute)

    Oh I just tested it Again home. Seems like its the late shutdown hook. I’m not getting the error anymore. But I have no idea if the purging is working either ??

    Thread Starter Compute

    (@compute)

    I guess I need some more testing from here..
    Thanks for your answer!

    Plugin Contributor Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    But I have no idea if the purging is working either ??

    Do you know how to monitor varnish?

    The easiest way to check would be to edit a post, and then as a NON logged in user see if the edit shows up.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘VHP_VARNISH_IP Notice’ is closed to new replies.