You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -409,9 +417,17 @@ public static function field_to_html( array $field ): string {
409
417
usort(
410
418
$format_spans,
411
419
staticfunction ( $a, $b ) {
412
-
return ( $a['start'] <=> $b['start'] )
413
-
?: ( $b['end'] <=> $a['end'] )
414
-
?: strcmp( $a['format'], $b['format'] );
420
+
$order = $a['start'] <=> $b['start'];
421
+
422
+
if ( 0 === $order ) {
423
+
$order = $b['end'] <=> $a['end'];
424
+
}
425
+
426
+
if ( 0 === $order ) {
427
+
$order = strcmp( $a['format'], $b['format'] );
428
+
}
429
+
430
+
return$order;
415
431
}
416
432
);
417
433
@@ -457,7 +473,7 @@ static function ( $a, $b ) {
457
473
while ( true ) {
458
474
// Close spans ending here (with close/reopen stack repair).
459
475
$reopen = array();
460
-
while ( count( $stack ) > 0 ) {
476
+
while ( array() !== $stack ) {
461
477
$has_ender = false;
462
478
foreach ( $stackas$span ) {
463
479
if ( $span['end'] === $position ) {
@@ -508,5 +524,5 @@ static function ( $a, $b ) {
508
524
* @since 7.2.0
509
525
* @access private
510
526
*/
511
-
class WP_Intent_Log_Unsupported_Html extends Exception {}
527
+
class WP_Intent_Log_Unsupported_Html extends Exception {}// phpcs:ignore Generic.Files.OneObjectStructurePerFile.MultipleFound -- Internal signal exception, colocated with its only thrower.
0 commit comments