Fix invalid operand type

`array_walk` accepts `ArrayIterator` as a first argument, but it is
undocumented feature, therefore it may change in future versions of php.
And it is also not supported by hhvm.