Merge pull request #1796 from sivolobov/master

Fixed bug that caused an error: "array_merge(): Argument #2 is not an ar...
Added specs examples for overriding criteria and sorting parameters in route.
Merge remote-tracking branch 'upstream/master'