Skip to content

Commit 2d8f37d

Browse files
Plugins: Remove incorrect entries from the recently_activated option array.
This aims to avoid a fatal error if the array was somehow corrupted and contains non-numeric values. Follow-up to [8049]. Props umeshsinghin, azora, sabernhardt, deepakrohilla, narenin, SergeyBiryukov. Fixes #62542. git-svn-id: https://develop.svn.wordpress.org/trunk@61481 602fd350-edb4-49c9-b593-d223f7449a82
1 parent f520ced commit 2d8f37d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wp-admin/includes/class-wp-plugins-list-table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ public function prepare_items() {
186186
}
187187

188188
foreach ( $recently_activated as $key => $time ) {
189-
if ( $time + WEEK_IN_SECONDS < time() ) {
189+
if ( ! is_int( $time ) || $time + WEEK_IN_SECONDS < time() ) {
190190
unset( $recently_activated[ $key ] );
191191
}
192192
}

0 commit comments

Comments
 (0)