Changeset 45639
- Timestamp:
- 07/15/2019 06:24:08 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-manager.php
r45494 r45639 5099 5099 'section' => 'title_tagline', 5100 5100 'priority' => 8, 5101 'height' => $custom_logo_args[0]['height'],5102 'width' => $custom_logo_args[0]['width'],5103 'flex_height' => $custom_logo_args[0]['flex-height'],5104 'flex_width' => $custom_logo_args[0]['flex-width'],5101 'height' => isset( $custom_logo_args[0]['height'] ) ? $custom_logo_args[0]['height'] : null, 5102 'width' => isset( $custom_logo_args[0]['width'] ) ? $custom_logo_args[0]['width'] : null, 5103 'flex_height' => isset( $custom_logo_args[0]['flex-height'] ) ? $custom_logo_args[0]['flex-height'] : null, 5104 'flex_width' => isset( $custom_logo_args[0]['flex-width'] ) ? $custom_logo_args[0]['flex-width'] : null, 5105 5105 'button_labels' => array( 5106 5106 'select' => __( 'Select logo' ), -
trunk/src/wp-includes/customize/class-wp-customize-nav-menu-item-setting.php
r45427 r45639 478 478 public function filter_wp_get_nav_menu_items( $items, $menu, $args ) { 479 479 $this_item = $this->value(); 480 $current_nav_menu_term_id = $this_item['nav_menu_term_id']; 481 unset( $this_item['nav_menu_term_id'] ); 480 $current_nav_menu_term_id = null; 481 if ( isset( $this_item['nav_menu_term_id'] ) ) { 482 $current_nav_menu_term_id = $this_item['nav_menu_term_id']; 483 unset( $this_item['nav_menu_term_id'] ); 484 } 482 485 483 486 $should_filter = ( … … 494 497 false === $this_item 495 498 || 496 true === $this_item['_invalid']499 ( isset( $this_item['_invalid'] ) && true === $this_item['_invalid'] ) 497 500 || 498 501 ( -
trunk/src/wp-includes/meta.php
r45590 r45639 524 524 if ( ! $meta_cache ) { 525 525 $meta_cache = update_meta_cache( $meta_type, array( $object_id ) ); 526 $meta_cache = $meta_cache[ $object_id ]; 526 if ( isset( $meta_cache[ $object_id ] ) ) { 527 $meta_cache = $meta_cache[ $object_id ]; 528 } else { 529 $meta_cache = null; 530 } 527 531 } 528 532 -
trunk/src/wp-includes/rest-api/class-wp-rest-request.php
r45304 r45639 295 295 * @since 4.4.0 296 296 * 297 * @return array Map containing 'value' and 'parameters' keys. 297 * @return array|null Map containing 'value' and 'parameters' keys 298 * or null when no valid content-type header was 299 * available. 298 300 */ 299 301 public function get_content_type() { … … 335 337 336 338 $content_type = $this->get_content_type(); 337 if ( $content_type['value'] === 'application/json') {339 if ( isset( $content_type['value'] ) && 'application/json' === $content_type['value'] ) { 338 340 $order[] = 'JSON'; 339 341 } -
trunk/src/wp-includes/theme.php
r45628 r45639 2372 2372 * for post thumbnails. 2373 2373 */ 2374 if ( is _array( $args[0] ) && isset( $_wp_theme_features['post-thumbnails'] ) ) {2374 if ( isset( $args[0] ) && is_array( $args[0] ) && isset( $_wp_theme_features['post-thumbnails'] ) ) { 2375 2375 $args[0] = array_unique( array_merge( $_wp_theme_features['post-thumbnails'][0], $args[0] ) ); 2376 2376 } … … 2379 2379 2380 2380 case 'post-formats': 2381 if ( is _array( $args[0] ) ) {2381 if ( isset( $args[0] ) && is_array( $args[0] ) ) { 2382 2382 $post_formats = get_post_format_slugs(); 2383 2383 unset( $post_formats['standard'] ); … … 2392 2392 // Build an array of types for back-compat. 2393 2393 $args = array( 0 => array( 'comment-list', 'comment-form', 'search-form' ) ); 2394 } elseif ( ! is _array( $args[0] ) ) {2394 } elseif ( ! isset( $args[0] ) || ! is_array( $args[0] ) ) { 2395 2395 _doing_it_wrong( "add_theme_support( 'html5' )", __( 'You need to pass an array of types.' ), '3.6.1' ); 2396 2396 return false; … … 2404 2404 2405 2405 case 'custom-logo': 2406 if ( ! is_array( $args )) {2406 if ( true === $args ) { 2407 2407 $args = array( 0 => array() ); 2408 2408 } … … 2427 2427 2428 2428 case 'custom-header': 2429 if ( ! is_array( $args )) {2429 if ( true === $args ) { 2430 2430 $args = array( 0 => array() ); 2431 2431 } … … 2517 2517 2518 2518 case 'custom-background': 2519 if ( ! is_array( $args )) {2519 if ( true === $args ) { 2520 2520 $args = array( 0 => array() ); 2521 2521 } -
trunk/src/wp-includes/user.php
r45590 r45639 2089 2089 /** This filter is documented in wp-includes/pluggable.php */ 2090 2090 $default_cookie_life = apply_filters( 'auth_cookie_expiration', ( 2 * DAY_IN_SECONDS ), $ID, false ); 2091 $remember = ( ( $logged_in_cookie['expiration'] - time() ) > $default_cookie_life ); 2091 $remember = false; 2092 if ( false !== $logged_in_cookie && ( $logged_in_cookie['expiration'] - time() ) > $default_cookie_life ) { 2093 $remember = true; 2094 } 2092 2095 2093 2096 wp_set_auth_cookie( $ID, $remember ); -
trunk/src/wp-includes/wp-db.php
r45635 r45639 3114 3114 if ( ! empty( $value['db'] ) ) { 3115 3115 // We're going to need to truncate by characters or bytes, depending on the length value we have. 3116 if ( 'byte' === $value['length']['type'] ) {3116 if ( isset( $value['length']['type'] ) && 'byte' === $value['length']['type'] ) { 3117 3117 // Using binary causes LEFT() to truncate by bytes. 3118 3118 $charset = 'binary'; -
trunk/tests/phpunit/tests/query/generatePostdata.php
r44941 r45639 25 25 26 26 // Fails because there's no post with this ID. 27 $this->assert NotSame( $fake->ID, $data['id']);27 $this->assertFalse( $data ); 28 28 } 29 29 -
trunk/tests/phpunit/tests/term/termExists.php
r43571 r45639 151 151 _unregister_taxonomy( 'foo' ); 152 152 153 $this->assertSame( null, $found ['term_id']);153 $this->assertSame( null, $found ); 154 154 } 155 155
Note: See TracChangeset
for help on using the changeset viewer.