Skip to content

Commit bde676c

Browse files
tbradshamatticbot
authored andcommitted
Phan: Address PhanRedundantCondition, PhanRedundantArrayValuesCall, and PhanPluginRedundantAssignment violations (#45681)
Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/18973127629 Upstream-Ref: Automattic/jetpack@4a37fb5
1 parent 3ef325a commit bde676c

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ This is an alpha version! The changes listed here are not final.
1515
### Changed
1616
- Update package dependencies.
1717

18+
### Fixed
19+
- Phan: Address PhanRedundantCondition, PhanRedundantArrayValuesCall, and PhanPluginRedundantAssignment violations.
20+
1821
## [3.0.2] - 2025-10-10
1922
### Added
2023
- Add typecheck support for E2E tests. [#44788]

rest/class.wp-super-cache-rest-update-settings.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,6 @@ protected function set_super_cache_enabled( $value ) {
216216
add_mod_rewrite_rules();
217217

218218
} elseif( $value == 2 ) { // PHP
219-
$wp_cache_mod_rewrite = 0;
220219
remove_mod_rewrite_rules();
221220

222221
}

wp-cache-phase2.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2508,7 +2508,6 @@ function wp_cache_get_ob( &$buffer ) {
25082508
}
25092509
}
25102510

2511-
$new_cache = true;
25122511
if ( $fr ) {
25132512
$supercacheonly = false;
25142513
fclose( $fr );
@@ -2911,7 +2910,6 @@ function wp_cache_shutdown_callback() {
29112910
$value = 'application/rss+xml';
29122911
}
29132912
}
2914-
$is_feed = true;
29152913

29162914
if ( isset( $wpsc_feed_ttl ) && $wpsc_feed_ttl == 1 ) {
29172915
$wp_cache_meta['ttl'] = 60;

wp-cache.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ function wp_cache_manager_updates() {
744744
return false;
745745

746746
if ( false == isset( $cache_page_secret ) ) {
747-
$cache_page_secret = md5( (string) ( gmdate( 'H:i:s' ) . wp_rand() ) );
747+
$cache_page_secret = md5( gmdate( 'H:i:s' ) . wp_rand() );
748748
wp_cache_replace_line('^ *\$cache_page_secret', "\$cache_page_secret = '" . $cache_page_secret . "';", $wp_cache_config_file);
749749
}
750750

@@ -2990,7 +2990,7 @@ function wp_cache_admin_notice() {
29902990
function wp_cache_check_site() {
29912991
global $wp_super_cache_front_page_check, $wp_super_cache_front_page_clear, $wp_super_cache_front_page_text, $wp_super_cache_front_page_notification, $wpdb;
29922992

2993-
if ( !isset( $wp_super_cache_front_page_check ) || ( isset( $wp_super_cache_front_page_check ) && $wp_super_cache_front_page_check == 0 ) ) {
2993+
if ( empty( $wp_super_cache_front_page_check ) ) {
29942994
return false;
29952995
}
29962996

0 commit comments

Comments
 (0)