Remove useless foreach
Merge pull request #6756 from lucasmichot/5.0-session-store-attribute

[5.0] Remove Useless Foreach