positional aggregate cannot have one component

29
Jan

Because of ambiguity creating an array may require you to include an explicit positional declaration.

In an array, this usually means starting your array with 1 => as in:

1
 

This is not always required, but whenever you get that error, that's how you solve the problem. Another way is to have two or more items in your array. Obviously, for arrays that have only one element, this last possibility is not a solution... hence the use of the positional declaration.

Reference: RM2005 4.3.3, NOTES 10 § 32
0
Your rating: None