Call to a member function validate()

LiteCart Fan
Από Sweden
Μέλος από Οκτ 2021

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
Από Sweden
Μέλος από Οκτ 2021

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
Από Sweden
Μέλος από Μαΐ 2013
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
Από Sweden
Μέλος από Οκτ 2021

it is 2.4.4 v or older.

so, it is not necessary right ?

tim
Founder
Από Sweden
Μέλος από Μαΐ 2013
tim

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

Εσύ
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.