Call to a member function validate()

LiteCart Fan
Tól től Sweden
Tagság okt. 2021 óta

Hello there
When I go cart page, there is an error sometimes. it is not always if there is error I just refresh the page then error will be gone. Can you have a look at error and explain me what might be a reason it?

Fatal error: Uncaught Error: Call to a member function validate() on null in /Applications/XAMPP/xamppfiles/htdocs/futureshop.2.4.4/vqmod/vqcache/vq2-pages_ajax_checkout_customer.inc.php:249 Stack trace: #0 /Applications/XAMPP/xamppfiles/htdocs/futureshop.2.4.4/includes/library/lib_route.inc.php(125): include() #1 /Applications/XAMPP/xamppfiles/htdocs/futureshop.2.4.4/index.php(40): route::process() #2 {main} thrown in /Applications/XAMPP/xamppfiles/htdocs/futureshop.2.4.4/vqmod/vqcache/vq2-pages_ajax_checkout_customer.inc.php on line 249

I checked the file that error mentioned line, there is nothing wrong with it.

LiteCart Fan
Tól től Sweden
Tagság okt. 2021 óta

it is not removed in file. it mentioned this code on line.

'error' => $order->validate(isset($shipping) ? $shipping : ''),


  $box_checkout_customer->snippets = [
    'account_exists' => $account_exists,
    'subscribed_to_newsletter' => $subscribed_to_newsletter,
    'error' => $order->validate(isset($shipping) ? $shipping : ''),
  ];
  echo $box_checkout_customer->stitch('views/box_checkout_customer');```

is it might be a reason because of null value of $shipping variable ?
tim
Founder
Tól től Sweden
Tagság máj. 2013 óta
tim

It doesn't look like mine:


  $box_checkout_customer->snippets = [
    'account_exists' => $account_exists,
    'subscribed_to_newsletter' => $subscribed_to_newsletter,
  ];
  echo $box_checkout_customer->stitch('views/box_checkout_customer');```

Is this a super old version?
LiteCart Fan
Tól től Sweden
Tagság okt. 2021 óta

it is 2.4.4 v or older.

so, it is not necessary right ?

tim
Founder
Tól től Sweden
Tagság máj. 2013 óta
tim

No, you can toss that line.
2.5.x is a version great of fun, I recommend upgrading.

Te
Ez a weboldal nem használ cookie-kat és nem használ harmadik féltől származó nyomkövetési technológiát. Úgy gondoljuk, hogy jobban tudjuk csinálni, mint mások, és tényleg gondolunk az Ön magánéletére.