diff --git a/module/VuFind/src/VuFind/Controller/CartController.php b/module/VuFind/src/VuFind/Controller/CartController.php index 4c3dbbb7824514e8752729d3c3a64e21eb6300f0..e3bc265ad355498f6e5f182fc7d82050d25fd441 100644 --- a/module/VuFind/src/VuFind/Controller/CartController.php +++ b/module/VuFind/src/VuFind/Controller/CartController.php @@ -102,6 +102,11 @@ class CartController extends AbstractBase */ public function cartAction() { + // Bail out if cart is disabled. + if (!$this->getCart()->isActive()) { + return $this->redirect()->toRoute('home'); + } + $ids = is_null($this->params()->fromPost('selectAll')) ? $this->params()->fromPost('ids') : $this->params()->fromPost('idsAll');