I am getting the following warning when trying to add data to a session (and checking if it already exists).
Warning: in_array() expects parameter 2 to be
you should always apply check for array
isset( $_SESSION['product']) in your is condition before & condition