Invalid product vars
at line 104 in file classes/Link.php
98. if (is_array($product) && isset($product['id_product']))
99. $product = new Product($product['id_product'], false, $id_lang, $id_shop);
100. elseif ((int)$product)
101. $product = new Product((int)$product, false, $id_lang, $id_shop);
102. else
103. throw new PrestaShopException('Invalid product vars');
104. }
105.
106. // Set available keywords
107. $params = array();
108. $params['id'] = $product->id;
110.
111. switch ($this->product->redirect_type)
112. {
113. case '301':
114. header('HTTP/1.1 301 Moved Permanently');
115. header('Location: '.$this->context->link->getProductLink($this->product->id_product_redirected));
116. break;
117. case '302':
118. header('HTTP/1.1 302 Moved Temporarily');
119. header('Cache-Control: no-cache');
120. header('Location: '.$this->context->link->getProductLink($this->product->id_product_redirected));
Argument [0] 0
157. /**
158. * Start controller process (this method shouldn't be overriden !)
159. */
160. public function run()
161. {
162. $this->init();
163. if ($this->checkAccess())
164. {
165. // setMedia MUST be called before postProcess
166. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className)))
167. $this->setMedia();
367. // Execute hook dispatcher
368. if (isset($params_hook_action_dispatcher))
369. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
370.
371. // Running controller
372. $controller->run();
373. }
374. catch (PrestaShopException $e)
375. {
376. $e->displayMessage();
377. }
22. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
23. * International Registered Trademark & Property of PrestaShop SA
24. */
25.
26. require(dirname(__FILE__).'/config/config.inc.php');
27. Dispatcher::getInstance()->dispatch();