Cast to array in read for safety. It happens sometimes that session or cookies are NULL, at least is has to be an empty array.