This will call array_merge on things that aren't arrays (because of the ||). I think you can cast to array and it wont give you a warning then and will work. This code is a little odd though.