Invalid data type, must be an array or \ArrayAccess instance.