Ticket #44118: fix-update_plugins-transient.patch
File fix-update_plugins-transient.patch, 1.1 KB (added by , 7 years ago) |
---|
-
src/wp-includes/update.php
268 268 $current = new stdClass; 269 269 } 270 270 271 $new_option = new stdClass;272 $new_option->last_checked = time();273 274 271 $doing_cron = wp_doing_cron(); 275 272 276 273 // Check for update on a different schedule, depending on the page. … … 298 295 if ( $time_not_changed && ! $extra_stats ) { 299 296 $plugin_changed = false; 300 297 foreach ( $plugins as $file => $p ) { 301 $new_option->checked[ $file ] = $p['Version'];302 303 298 if ( ! isset( $current->checked[ $file ] ) || strval( $current->checked[ $file ] ) !== strval( $p['Version'] ) ) { 304 299 $plugin_changed = true; 305 300 } … … 383 378 return; 384 379 } 385 380 381 $new_option = new stdClass; 382 $new_option->last_checked = time(); 383 foreach ( $plugins as $file => $p ) { 384 $new_option->checked[ $file ] = $p['Version']; 385 } 386 386 387 $response = json_decode( wp_remote_retrieve_body( $raw_response ), true ); 387 388 foreach ( $response['plugins'] as &$plugin ) { 388 389 $plugin = (object) $plugin;