Skip to content

Commit a06adb6

Browse files
authored
Fix FastCGI_Purger::purge_amp_version() for purge_method=unlink_files
Resolves rtCamp#396.
1 parent a277274 commit a06adb6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

admin/class-fastcgi-purger.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,13 @@ public function purge_url( $url, $feed = true ) {
103103
* @param string $url_base The base URL to purge.
104104
*/
105105
private function purge_amp_version( $url_base ) {
106+
global $nginx_helper_admin;
107+
106108
$amp_url = sprintf( '%s/amp/', rtrim( $url_base, '/' ) );
107109

108110
$this->log( '- Purging AMP URL | ' . $amp_url );
109111

110-
if ( 'unlink_files' === $this->nginx_helper_admin->options['purge_method'] ) {
112+
if ( 'unlink_files' === $nginx_helper_admin->options['purge_method'] ) {
111113
$this->delete_cache_file_for( $amp_url );
112114
} else {
113115
$this->do_remote_get( $amp_url );

0 commit comments

Comments
 (0)