array cast is too early
Merge pull request #5523 from lucasmichot/4.2-validation-getrules

[4.2] Validation : array cast happens too early