Invalid product vars
at line 173 in file classes/Link.php
168. if (is_array($product) && isset($product['id_product'])) {
169. $params['id'] = $product['id_product'];
170. } elseif ((int) $product) {
171. $params['id'] = $product;
172. } else {
173. throw new PrestaShopException('Invalid product vars');
174. }
175. } else {
176. $params['id'] = $product->id;
177. }
178.
1349. ];
1350. }
1351.
1352. $breadcrumb['links'][] = [
1353. 'title' => $this->product->name,
1354. 'url' => $this->context->link->getProductLink($this->product, null, null, null, null, null, (int) $this->getIdProductAttributeByRequest()),
1355. ];
1356.
1357. return $breadcrumb;
1358. }
1359.
Argument [0] Argument [1] Argument [2] Argument [3] Argument [4] 1 Argument [5] Argument [6] 0
1852. return $page;
1853. }
1854.
1855. public function getBreadcrumb()
1856. {
1857. $breadcrumb = $this->getBreadcrumbLinks();
1858. $breadcrumb['count'] = count($breadcrumb['links']);
1859.
1860. return $breadcrumb;
1861. }
1862.
544. 'shop' => $this->getTemplateVarShop(),
545. 'core_js_public_path' => $this->getCoreJsPublicPath(),
546. 'urls' => $this->getTemplateVarUrls(),
547. 'configuration' => $this->getTemplateVarConfiguration(),
548. 'field_required' => $this->context->customer->validateFieldsRequiredDatabase(),
549. 'breadcrumb' => $this->getBreadcrumb(),
550. 'link' => $this->context->link,
551. 'time' => time(),
552. 'static_token' => Tools::getToken(false),
553. 'token' => Tools::getToken(),
554. 'debug' => _PS_MODE_DEV_,
602. /**
603. * Initializes common front page content: header, footer and side columns.
604. */
605. public function initContent()
606. {
607. $this->assignGeneralPurposeVariables();
608. $this->process();
609.
610. if (!isset($this->context->cart)) {
611. $this->context->cart = new Cart();
612. }
460.
461. // Assign attribute groups to the template
462. $this->assignAttributesGroups($product_for_template);
463. }
464.
465. parent::initContent();
466. }
467.
468. /**
469. * Processes submitted customizations
470. *
351. if (!Module::isEnabled('hideproduct')) {
352. return parent::initContent();
353. }
354. include_once(_PS_MODULE_DIR_.'hideproduct/classes/HideproductConfiguration.php');
355. HideproductConfiguration::redirectProductURL();
356. parent::initContent();
357. }
358. }
314. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
315. $this->initHeader();
316. }
317.
318. if ($this->viewAccess()) {
319. $this->initContent();
320. } else {
321. $this->errors[] = $this->trans('Access denied.', [], 'Admin.Notifications.Error');
322. }
323.
324. if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className))) {
505.
506. // Execute hook dispatcher
507. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
508.
509. // Running controller
510. $controller->run();
511.
512. // Execute hook dispatcher after
513. Hook::exec('actionDispatcherAfter', $params_hook_action_dispatcher);
514. } catch (PrestaShopException $e) {
515. $e->displayMessage();
23. * @copyright Since 2007 PrestaShop SA and Contributors
24. * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
25. */
26.
27. require dirname(__FILE__).'/config/config.inc.php';
28. Dispatcher::getInstance()->dispatch();