• Theres no check on whether $url in purgeUrl() is actually an URL. When using 3rd party plugins like Contact Form 7 and saving a post there, FALSE is inserted into $purgeUrls, resulting in warnings when purging since you assume $p[‘host’] is set.

    A simple fix:

    public function purgeUrl( $url ) {
    	$p = parse_url( $url );
    
    	if (!isset($p['host'])) {
    		return;
    	}
    
Viewing 1 replies (of 1 total)
  • Plugin Contributor Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    That … seems odd since you shouldn’t be able to get to purgeUrl unless you’re a URL.

    I’ll put in a URL check failsafe, however given that the URL flush is being called only on specific commands (like saving posts etc) and even THEN only when a post is a published post, I’m curious as to how the heck CF7 even got there! You see, the whole public function purgePost is grabbing a POST id, checking that it’s legit, and then extracting IT’S url. It’s literally adding the URL as found. So that stands to reason then that CF7 is somehow having WP report a URL that isn’t actually a URL. And that is weird.

Viewing 1 replies (of 1 total)
  • The topic ‘Errors on purge with certain 3rd party plugins’ is closed to new replies.