Call to a member function validate()

LiteCart Fan
Från Sweden
Medlem sedan okt. 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
Från Sweden
Medlem sedan okt. 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
Från Sweden
Medlem sedan maj 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
Från Sweden
Medlem sedan okt. 2021

it is 2.4.4 v or older.

so, it is not necessary right ?

tim
Founder
Från Sweden
Medlem sedan maj 2013
tim

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

Du
Denna webbplats använder inga kakor och ingen spårningsteknik från tredje part . Vi tror att vi kan göra det bättre än andra och tänker verkligen på din integritet.