Fix + tests for #5969
Merge branch 'master' of https://github.com/thorie7912/zf2 into thorie7912-master
Merge branch 'thorie7912-master'