Fix #142 Issue about empty-array for array type in function

- added fix

- added test
Merge pull request #153 from zaets28rus/142_issue

Fix #142 Issue about empty-array for array type in function