Invalid product vars
at line 107 in file classes/Link.php
102. if (is_array($product) && isset($product['id_product'])) {
103. $product = new Product($product['id_product'], false, $id_lang, $id_shop);
104. } elseif ((int)$product) {
105. $product = new Product((int)$product, false, $id_lang, $id_shop);
106. } else {
107. throw new PrestaShopException('Invalid product vars');
108. }
109. }
110.
111. // Set available keywords
112. $params = array();
433. return '<link rel="canonical" href="'.$this->context->link->getProductLink($dur_product->id, $dur_product->link_rewrite, $dur_category->link_rewrite).'" />';
434. }
435. else {
436. $dur_product = new Product(Tools::getValue('id_product'), NULL, $this->context->cookie->id_lang);
437. $dur_category = new Category($dur_product->id_category_default, $this->context->cookie->id_lang);
438. return '<link rel="canonical" href="'.$this->context->link->getProductLink($dur_product->id, $dur_product->link_rewrite, $dur_category->link_rewrite).'" />';
439. }
440. }
441. }
442. //versions 1.4.x
443. if ($this->v14) {
Argument [0] Argument [1] Argument [2]
583. }
584. }
585.
586. // Immediately return the result if we do not log performances
587. if (!Module::$_log_modules_perfs) {
588. return $module->{$method}($params);
589. }
590.
591. // Store time and memory before and after hook call and save the result in the database
592. $time_start = microtime(true);
593. $memory_start = memory_get_usage(true);
Argument [0]
540.
541. // Call hook method
542. if ($hook_callable) {
543. $display = Hook::coreCallHook($moduleInstance, 'hook'.$hook_name, $hook_args);
544. } elseif ($hook_retro_callable) {
545. $display = Hook::coreCallHook($moduleInstance, 'hook'.$retro_hook_name, $hook_args);
546. }
547.
548. // Live edit
549. if (!$array_return && $array['live_edit'] && Tools::isSubmit('live_edit') && Tools::getValue('ad')
550. && Tools::getValue('liveToken') == Tools::getAdminToken('AdminModulesPositions'
Argument [0] Argument [1] hookheader Argument [2]
575.
576. if (!$this->useMobileTheme()) {
577. // These hooks aren't used for the mobile theme.
578. // Needed hooks are called in the tpl files.
579. $this->context->smarty->assign(array(
580. 'HOOK_HEADER' => Hook::exec('displayHeader'),
581. 'HOOK_TOP' => Hook::exec('displayTop'),
582. 'HOOK_LEFT_COLUMN' => ($this->display_column_left ? Hook::exec('displayLeftColumn') : ''),
583. 'HOOK_RIGHT_COLUMN' => ($this->display_column_right ? Hook::exec('displayRightColumn', array('cart' => $this->context->cart)) : ''),
584. ));
585. } else {
Argument [0] displayHeader
168. * Assign template vars related to page content
169. * @see FrontController::initContent()
170. */
171. public function initContent()
172. {
173. parent::initContent();
174.
175. if (!$this->errors) {
176. if (Pack::isPack((int)$this->product->id) && !Pack::isInStock((int)$this->product->id)) {
177. $this->product->quantity = 0;
178. }
185. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
186. $this->initHeader();
187. }
188.
189. if ($this->viewAccess()) {
190. $this->initContent();
191. } else {
192. $this->errors[] = Tools::displayError('Access denied.');
193. }
194.
195. if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className))) {
365. if (isset($params_hook_action_dispatcher)) {
366. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
367. }
368.
369. // Running controller
370. $controller->run();
371. } catch (PrestaShopException $e) {
372. $e->displayMessage();
373. }
374. }
375.
23. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
24. * International Registered Trademark & Property of PrestaShop SA
25. */
26.
27. require(dirname(__FILE__).'/config/config.inc.php');
28. Dispatcher::getInstance()->dispatch();