wp/wp-includes/class-walker-page-dropdown.php
changeset 21 48c4eec2b7e6
parent 19 3d72ae0968f4
--- a/wp/wp-includes/class-walker-page-dropdown.php	Thu Sep 29 08:06:27 2022 +0200
+++ b/wp/wp-includes/class-walker-page-dropdown.php	Fri Sep 05 18:40:08 2025 +0200
@@ -62,14 +62,15 @@
 	public function start_el( &$output, $data_object, $depth = 0, $args = array(), $current_object_id = 0 ) {
 		// Restores the more descriptive, specific name for use within this method.
 		$page = $data_object;
-		$pad  = str_repeat( ' ', $depth * 3 );
+
+		$pad = str_repeat( ' ', $depth * 3 );
 
 		if ( ! isset( $args['value_field'] ) || ! isset( $page->{$args['value_field']} ) ) {
 			$args['value_field'] = 'ID';
 		}
 
 		$output .= "\t<option class=\"level-$depth\" value=\"" . esc_attr( $page->{$args['value_field']} ) . '"';
-		if ( $page->ID == $args['selected'] ) {
+		if ( $page->ID === (int) $args['selected'] ) {
 			$output .= ' selected="selected"';
 		}
 		$output .= '>';