In the statement $_SESSION['cart'][$product]+=$quantity;
You are using += and this is what causing the problem.
When you add the product for the first time it will throw error and afterwords work fine.
To solve this do something like this.
$quantity= $_POST['qty'];
if(!empty($_SESSION['cart'][$product])){
$quantity = $quantity + $_SESSION['cart'][$product];
}
$_SESSION['cart'][$product] = $quantity;