Fix invalid operand type

array_walk accepts ArrayIterator as first argument, but it is
undocumented feature, therefore it may change in future versions of php.
And it is also not supported by hhvm.
Merge pull request #1511 from wikidi/fix-invalid-operand-type

Fix invalid operand type