Changeset 9512 for trunk/wp-admin/includes/update.php
- Timestamp:
- 11/04/2008 05:12:03 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/update.php
r9441 r9512 35 35 if ( !is_array( $dismissed ) ) $dismissed = array(); 36 36 $from_api = get_option( 'update_core' ); 37 if ( !is_array( $from_api ) ) return false; 37 if ( empty($from_api) ) 38 return false; 39 if ( !is_array( $from_api->updates ) ) return false; 40 $updates = $from_api->updates; 41 if ( !is_array( $updates ) ) return false; 38 42 $result = array(); 39 foreach($ from_apias $update) {43 foreach($updates as $update) { 40 44 if ( array_key_exists( $update->current.'|'.$update->locale, $dismissed ) ) { 41 45 if ( $options['dismissed'] ) { … … 69 73 function find_core_update( $version, $locale ) { 70 74 $from_api = get_option( 'update_core' ); 71 if ( !is_array( $from_api ) ) return false; 72 foreach($from_api as $update) { 75 if ( !is_array( $from_api->updates ) ) return false; 76 $updates = $from_api->updates; 77 foreach($updates as $update) { 73 78 if ( $update->current == $version && $update->locale == $locale ) 74 79 return $update;
Note: See TracChangeset
for help on using the changeset viewer.