WordPress site issue when moving PHP version from 7.4 to 8.0

I have WP site (SAFE4YOU) that specializes in insurance that hosting now on “SiteGround” with PHP 7.4 version.

Im trying to migrate that site to “Kinsta” servers but there the earliest PHP version is 8.0 so I have to change the site to that version.

after I migrate the site all looks great except one page, the calculator pricing page : https://safe4you.kinsta.cloud/calculator/main-calculator/

the problem is, after I choose destination and date (first screen), and after I chose ages (second screen) the system needs to trow the results (third screen) and seems its not working.

safe4you calculator issue

on error.log:

2022/12/27 08:37:51 [error] 72560#72560: *6310 FastCGI sent in stderr: "PHP message: PHP Warning: Undefined array key "days_2" in /www/safe4you_296/public/wp-content/themes/hello-theme-child-master/functions.php on line 145PHP message: PHP Warning: Undefined array key "days_2" in /www/safe4you_296/public/wp-content/themes/hello-theme-child-master/functions.php on line 184PHP message: PHP Warning: Undefined array key "option_to_person" in /www/safe4you_296/public/wp-content/themes/hello-theme-child-master/functions.php on line 308PHP message: PHP Warning: Undefined array key "days_2" in /www/safe4you_296/public/wp-content/themes/hello-theme-child-master/functions.php on line 145PHP message: PHP Warning: Undefined array key "days_2" in /www/safe4you_296/public/wp-content/themes/hello-theme-child-master/functions.php on line 184PHP message: PHP Warning: Undefined array key "option_to_person" in /www/safe4you_296/public/wp-content/themes/hello-theme-child-master/functions.php on line 308PHP message: PHP Warning: Undefined array key "days_2" in /www/safe4you_296/public/wp-content/themes/hello-theme-child-master/functions.php on line 145PHP message: PHP Warning: Undefined array key "days_2" in /www/safe4you_296/public/wp-content/themes/hello-theme-child-master/functions.php on line 184PHP message: PHP Warning: Undefined array key "option_to_person" in /www/safe4you_296/public/wp-content/themes/hello-theme-child-master/functions.php on line 308PHP message: PHP Warning: Undefined array key "days_2" in /www/safe4you_296/public/wp-content/themes/hello-theme-child-master/functions.php on line 145PHP message: PHP Warning: Undefined array key "days_2" in /www/safe4you_296/public/wp-content/themes/hello-theme-child-master/functions.php on line 184PHP message: PHP Warning: Undefined array key "option_to_person" in /www/safe4you_296/public/wp-content/themes/hello-theme-child-master/functions.php on line 308PHP message: PHP Warning: Undefined array key "days_2" in /www/safe4you_296/public/wp-content/themes/hello-the

functions.php lines:
145 –

 $total_days_trip = $_COOKIE['days_2'] ? $_COOKIE['days_2'] : $_COOKIE['days'];

184 –

        $results[$company_id]['total_days'] = $post_form['days_2'] ? absint($post_form['days_2']) : absint( $post_form['days'] );

308 –

         if($post_form['option_to_person']){ // If in form data have at least 1 extension.

Im trying to change with “Kinsta” support manually the PHP version to 7.4 and they cant keep it because they dont give support for that version. when I changed the version all looks great.

I notice that all the error that came from function.php line have cookies/form data in common.

what I expecting:
if you go into that page : https://safe4you.co.il/calculator/main-calculator/
choose destination and date, after that choose passengers ages, and after that all the results need to displayed like on the image.

safe4you calculator expecting

its really weird. anyone can help?