Fix attributesToArray when you have set some attributes to hidden
Merge branch 'refs/heads/master' into 1.1