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
check if the value is set before use it with isset and use is_array to check if a given variable is an array.
if(isset($_GET['product']) && is_set($_SESSION['product']) && is_array($_SESSION['product']) && !in_array($_GET['product'], $_SESSION['product'])){
$_SESSION['product'][] = $_GET['product'];
}