FIX Mitigate continue; warning when run on PHP 7.3+ (fixes #9826)

PHP 7.3+ issues a warning when continue; is used inside a switch statement, as it has the same behaviour as break; HTMLBBCodeParser.php had such a continue; statement that is intended to skip to the the next record of the foreach that the switch sits inside. continue 2; needs to be used here.
This commit is contained in:
Aaron Cooper 2021-01-19 15:05:28 +13:00 committed by GitHub
parent c877954eef
commit e372e52e93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -502,7 +502,8 @@ class SSHTMLBBCodeParser
{ {
if (trim($tag['text']) == '') { if (trim($tag['text']) == '') {
//just an empty indentation or newline without value? //just an empty indentation or newline without value?
continue; //skip this iteration of the foreach loop
continue 2;
} }
$newTagArray[] = $child; $newTagArray[] = $child;
$openTags[] = $child['tag']; $openTags[] = $child['tag'];