Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15415912
D21551.id51298.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
864 B
Referenced Files
None
Subscribers
None
D21551.id51298.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D21551: In "array_mergev()", guarantee the "call_user_func_array()" parameter list is a natrual list
Attached
Detach File
Event Timeline
Log In to Comment