Ticket #56262: 56262.diff
File 56262.diff, 1.3 KB (added by , 2 years ago) |
---|
-
src/wp-includes/class-wp-list-util.php
164 164 */ 165 165 foreach ( $this->output as $key => $value ) { 166 166 if ( is_object( $value ) ) { 167 $newlist[ $key ] = $value->$field;167 $newlist[ $key ] = isset( $value->$field ) ? $value->$field : $value; 168 168 } else { 169 $newlist[ $key ] = $value[ $field ];169 $newlist[ $key ] = isset( $value[ $field ] ) ? $value[ $field ] : $value; 170 170 } 171 171 } 172 172 … … 182 182 foreach ( $this->output as $value ) { 183 183 if ( is_object( $value ) ) { 184 184 if ( isset( $value->$index_key ) ) { 185 $newlist[ $value->$index_key ] = $value->$field;185 $newlist[ $value->$index_key ] = isset( $value->$field ) ? $value->$field : $value; 186 186 } else { 187 $newlist[] = $value->$field;187 $newlist[] = isset( $value->$field ) ? $value->$field : $value; 188 188 } 189 189 } else { 190 190 if ( isset( $value[ $index_key ] ) ) { 191 $newlist[ $value[ $index_key ] ] = $value[ $field ];191 $newlist[ $value[ $index_key ] ] = isset( $value[ $field ] ) ? $value[ $field ] : $value; 192 192 } else { 193 $newlist[] = $value[ $field ];193 $newlist[] = isset( $value[ $field ] ) ? $value[ $field ] : $value; 194 194 } 195 195 } 196 196 }