Closed Romik90 closed 4 years ago
I just hit similar bug : Call to a member function setUser() on null. any quick fix for this cuss it's urgent
After over 6 hours the error cleared out. What could be the cause?
After over 6 hours the error cleared out. What could be the cause?
I tried to add to cart again but it failed to add to cart then the error came back. How do i even reset it?
I've seen this on routes without the web
middleware. Cart persistence is based on sessions, and it's handled by the web middleware in Laravel.
However I still consider this as a bug in Vanilo cart and will look into in the next days.
Same here. Seems cartmanager > getUser() is called on non existing model.
Although getUser() checks if cart exists (session key), it does not check if this model is really available in DB. I think exists() should also verify that the cart is really in the DB, before getUser() is called on null.
Quickfix 1: delete sessions.
Quickfix 2:
CartManager.php
/**
* @inheritDoc
*/
public function exists()
{
return (bool) $this->getCartId() && $this->model();
}
Update to v1.1.1 for the fixed version composer update vanilo/cart ^1.1.1
I updated to 1.1 version. After adding some item to cart I tried to log in but encountered following error