array_reverse in line 1233 sometimes got no array as 1st arg