Skip to content

Commit 4a6b271

Browse files
mehmoodakrebeccahum
authored andcommitted
Fixes warning while reading integration config for PHP 8+ (#4882)
* Fixes warning by removing file_get_contents conditional
1 parent 46bfeaa commit 4a6b271

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

integrations/integration-vip-config.php

+4-6
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,10 @@ protected function get_vip_config_from_file( string $slug ) {
8989
* PHP cache can hold a reference to the old symlink that can cause fatal if we use require
9090
* on it.
9191
*/
92-
if ( false === @file_get_contents( $config_file_path ) ) { // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
93-
clearstatcache( true, $config_file_directory . '/' . $config_file_name );
94-
// Clears cache for files created by k8s ConfigMap.
95-
clearstatcache( true, $config_file_directory . '/..data' );
96-
clearstatcache( true, $config_file_directory . '/..data/' . $config_file_name );
97-
}
92+
clearstatcache( true, $config_file_directory . '/' . $config_file_name );
93+
// Clears cache for files created by k8s ConfigMap.
94+
clearstatcache( true, $config_file_directory . '/..data' );
95+
clearstatcache( true, $config_file_directory . '/..data/' . $config_file_name );
9896

9997
if ( ! is_readable( $config_file_path ) ) {
10098
return null;

0 commit comments

Comments
 (0)