Skip to content

Commit 8fd9a42

Browse files
authored
Fix PHP Notice: Undefined index: path
1 parent dab9edc commit 8fd9a42

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

admin/class-purger.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,8 @@ protected function delete_cache_file_for( $url ) {
387387
}
388388

389389
// Build a hash of the URL.
390-
$hash = md5( $url_data['scheme'] . 'GET' . $url_data['host'] . $url_data['path'] );
390+
$url_path = isset( $url_data['path'] ) ? $url_data['path'] : '';
391+
$hash = md5( $url_data['scheme'] . 'GET' . $url_data['host'] . $url_path );
391392

392393
// Ensure trailing slash.
393394
$cache_path = RT_WP_NGINX_HELPER_CACHE_PATH;

0 commit comments

Comments
 (0)