Make WordPress Core

Ticket #44543: patch-44543.patch

File patch-44543.patch, 1.4 KB (added by jrf, 7 years ago)
  • src/wp-includes/pomo/plural-forms.php

    From 2f7fe5eac74de0020ff9eeb9454474b7aeda2b5c Mon Sep 17 00:00:00 2001
    From: jrfnl <jrfnl@users.noreply.github.com>
    Date: Sun, 8 Jul 2018 23:38:30 +0200
    Subject: [PATCH] PHP 7.3 compatibility: fix using continue in switch
    
    ---
     src/wp-includes/pomo/plural-forms.php | 2 +-
     tests/phpunit/includes/utils.php      | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/src/wp-includes/pomo/plural-forms.php b/src/wp-includes/pomo/plural-forms.php
    index cabc807180..a66d00f6de 100644
    a b class Plural_Forms { 
    207207                                                $span     = strspn( $str, self::NUM_CHARS, $pos );
    208208                                                $output[] = array( 'value', intval( substr( $str, $pos, $span ) ) );
    209209                                                $pos     += $span;
    210                                                 continue;
     210                                                break;
    211211                                        }
    212212
    213213                                        throw new Exception( sprintf( 'Unknown symbol "%s"', $next ) );
  • tests/phpunit/includes/utils.php

    diff --git a/tests/phpunit/includes/utils.php b/tests/phpunit/includes/utils.php
    index 3c7b1bed34..412cfc5f16 100644
    a b function benchmark_pcre_backtracking( $pattern, $subject, $strategy ) { 
    497497                        case PREG_NO_ERROR:
    498498                                return $i;
    499499                        case PREG_BACKTRACK_LIMIT_ERROR:
    500                                 continue;
     500                                break;
    501501                        case PREG_RECURSION_LIMIT_ERROR:
    502502                                trigger_error( 'PCRE recursion limit encountered before backtrack limit.' );
    503503                                return;