Check that $matches[0] is actually an array

Bug: T279148
Change-Id: I687e07f2ce6d9574d7eef0442a6968321368fb19
This commit is contained in:
Mark A. Hershberger 2021-04-02 10:50:04 -04:00
parent 8e1c9e546b
commit 87ae0875be
No known key found for this signature in database
GPG key ID: C5E6B11787B8FA01

View file

@ -714,7 +714,8 @@ class SpecialReplaceText extends SpecialPage {
}
$poss = [];
foreach ( $matches[0] as $_ ) {
$match = $matches[0] ?? [];
foreach ( $match as $_ ) {
$poss[] = $_[1];
}