Call to a member function validate()

LiteCart Fan
Şundan Sweden
Eki 2021 tarihinden beri üye

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
Şundan Sweden
Eki 2021 tarihinden beri üye

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
Şundan Sweden
May 2013 tarihinden beri üye
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
Şundan Sweden
Eki 2021 tarihinden beri üye

it is 2.4.4 v or older.

so, it is not necessary right ?

tim
Founder
Şundan Sweden
May 2013 tarihinden beri üye
tim

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

Siz
This website uses no cookies and no third party tracking technology. We think we can do better than others and really think about your privacy.