Otherwise array_merge_recursive() will trigger a confusing and unhelpful
warning.
Bug: T102523
Change-Id: I7e4778cb7552fe93a08f315c9888ec64322e2501
/**
* @param string $name
- * @param mixed $value
+ * @param array $value
* @param array &$array
+ * @throws InvalidArgumentException
*/
protected function storeToArray( $name, $value, &$array ) {
+ if ( !is_array( $value ) ) {
+ throw new InvalidArgumentException( "The value for '$name' should be an array" );
+ }
if ( isset( $array[$name] ) ) {
$array[$name] = array_merge_recursive( $array[$name], $value );
} else {