You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix Collection unique() to handle numeric strings correctly
Fixes bug where SORT_REGULAR incorrectly deduplicates numeric strings
when a '+' prefix is present. Collections like ['+19495551234',
'9495551234', '19495551234'] now correctly return all three items
instead of incorrectly removing the 11-digit format.
The fix checks if the collection contains complex types (arrays/objects)
that require SORT_REGULAR, or scalar values where default array_unique()
is faster and more correct.
This works around a documented PHP limitation with SORT_REGULAR where
numeric strings are compared as numbers in certain contexts, causing
unexpected deduplication behavior.
See: php/doc-en#1463
Related to: 48a53be
0 commit comments