diff -r 34716fd837a4 -r be944660c56a wp/wp-includes/customize/class-wp-customize-nav-menu-setting.php --- a/wp/wp-includes/customize/class-wp-customize-nav-menu-setting.php Tue Dec 15 15:52:01 2020 +0100 +++ b/wp/wp-includes/customize/class-wp-customize-nav-menu-setting.php Wed Sep 21 18:19:35 2022 +0200 @@ -141,7 +141,7 @@ throw new Exception( "Illegal widget setting ID: $id" ); } - $this->term_id = intval( $matches['id'] ); + $this->term_id = (int) $matches['id']; parent::__construct( $manager, $id, $args ); } @@ -433,7 +433,7 @@ $value['name'] = trim( esc_html( $value['name'] ) ); // This sanitization code is used in wp-admin/nav-menus.php. $value['description'] = sanitize_text_field( $value['description'] ); - $value['parent'] = max( 0, intval( $value['parent'] ) ); + $value['parent'] = max( 0, (int) $value['parent'] ); $value['auto_add'] = ! empty( $value['auto_add'] ); if ( '' === $value['name'] ) { @@ -556,7 +556,7 @@ } $post_value = $setting->post_value( null ); - if ( ! is_null( $post_value ) && intval( $post_value ) === $this->previous_term_id ) { + if ( ! is_null( $post_value ) && (int) $post_value === $this->previous_term_id ) { $this->manager->set_post_value( $setting->id, $this->term_id ); $setting->save(); } @@ -570,7 +570,7 @@ } $widget_instance = $nav_menu_widget_setting->post_value(); // Note that this calls WP_Customize_Widgets::sanitize_widget_instance(). - if ( empty( $widget_instance['nav_menu'] ) || intval( $widget_instance['nav_menu'] ) !== $this->previous_term_id ) { + if ( empty( $widget_instance['nav_menu'] ) || (int) $widget_instance['nav_menu'] !== $this->previous_term_id ) { continue; }