Revert "PHP notice and warning about array_unique()"

This reverts commit 996feb9095eb1c4cb0a59712eed15ac3a9150845.
PHP notice and warning about array_unique()