Avoid unnecessary array conversion

(array) array('1'=>'val'); will convert key '1' to integer and this conversion causes wrong search result in "in_array($key...);"