According to php documentation:
Version 7.3 ::: An alternative signature supporting an options array has been added. This signature supports also setting of the SameSite cookie attribute.
Your are probably running PHP version 7.2 (or some other version) that does not support the option array parameter.
You can check the PHP that the server is using by ...