Skip to content

Commit

Permalink
Fixes warning while reading integration config for PHP 8+ (#4882)
Browse files Browse the repository at this point in the history
* Fixes warning by removing file_get_contents conditional
  • Loading branch information
mehmoodak authored and rebeccahum committed Sep 25, 2023
1 parent 46bfeaa commit 4a6b271
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions integrations/integration-vip-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,10 @@ protected function get_vip_config_from_file( string $slug ) {
* PHP cache can hold a reference to the old symlink that can cause fatal if we use require
* on it.
*/
if ( false === @file_get_contents( $config_file_path ) ) { // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
clearstatcache( true, $config_file_directory . '/' . $config_file_name );
// Clears cache for files created by k8s ConfigMap.
clearstatcache( true, $config_file_directory . '/..data' );
clearstatcache( true, $config_file_directory . '/..data/' . $config_file_name );
}
clearstatcache( true, $config_file_directory . '/' . $config_file_name );
// Clears cache for files created by k8s ConfigMap.
clearstatcache( true, $config_file_directory . '/..data' );
clearstatcache( true, $config_file_directory . '/..data/' . $config_file_name );

if ( ! is_readable( $config_file_path ) ) {
return null;
Expand Down

0 comments on commit 4a6b271

Please sign in to comment.