Revert "Refactoring, use function array_walk_recursive"

This reverts commit c69139c88bb192c967523dbf3ca8a906c8960e7b.
Pass true parameter