Page MenuHomePhabricator

D21551.id51298.diff
No OneTemporary

D21551.id51298.diff

diff --git a/src/utils/utils.php b/src/utils/utils.php
--- a/src/utils/utils.php
+++ b/src/utils/utils.php
@@ -876,14 +876,19 @@
if (!is_array($item)) {
throw new InvalidArgumentException(
pht(
- 'Expected all items passed to `%s` to be arrays, but '.
+ 'Expected all items passed to "array_mergev()" to be arrays, but '.
'argument with key "%s" has type "%s".',
- __FUNCTION__.'()',
$key,
gettype($item)));
}
}
+ // See T13588. In PHP8, "call_user_func_array()" will attempt to use
+ // "unnatural" array keys as named parameters, and then fail because
+ // "array_merge()" does not accept named parameters . Guarantee the list is
+ // a "natural" list to avoid this.
+ $arrayv = array_values($arrayv);
+
return call_user_func_array('array_merge', $arrayv);
}

File Metadata

Mime Type
text/plain
Expires
Fri, Mar 21, 8:24 AM (1 w, 39 m ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7685084
Default Alt Text
D21551.id51298.diff (864 B)

Event Timeline