This PR was squashed before being merged into the master branch (closes #1158).
Discussion
----------
Don't use array_fill for full array
When last array returned from array_chunk is full, array_fill is called with 0 as num argument, which causes fatal error. Additionally I've changed doc fill parameter, as other types are accepted as well, and added unit test.
Commits
-------
270c794 Don't use array_fill for full array