Skip to content

ss6 branch - Issues if no key set (eg local) #8

Description

@josephlewisnz

If no keys set then the module still attempts to purge pages, ultimately erroring out.

eg.

[Deprecated] str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated
POST /admin/pages/edit/EditForm/431
Line 406 in /var/www/html/vendor/catalyst.net.nz/silverstripe-cloudflare/src/Purge/Purge.php

Source
397         return $output;
398     }
399 
400     /**
401      * @return string
402      */
403     public function getEndpoint()
404     {
405         $zoneId = CloudFlare::singleton()->fetchZoneID();
406         return str_replace(":identifier", $zoneId, static::$endpoint);
407     }

Ideally, we just shouldn't be calling purge if no keys set

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions