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 { |
207 | 207 | $span = strspn( $str, self::NUM_CHARS, $pos ); |
208 | 208 | $output[] = array( 'value', intval( substr( $str, $pos, $span ) ) ); |
209 | 209 | $pos += $span; |
210 | | continue; |
| 210 | break; |
211 | 211 | } |
212 | 212 | |
213 | 213 | throw new Exception( sprintf( 'Unknown symbol "%s"', $next ) ); |
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 ) { |
497 | 497 | case PREG_NO_ERROR: |
498 | 498 | return $i; |
499 | 499 | case PREG_BACKTRACK_LIMIT_ERROR: |
500 | | continue; |
| 500 | break; |
501 | 501 | case PREG_RECURSION_LIMIT_ERROR: |
502 | 502 | trigger_error( 'PCRE recursion limit encountered before backtrack limit.' ); |
503 | 503 | return; |