fixed by making all calls to in_array and array_search STRICT (3d param, bool = true) (thanks to henkjan)