Invalid product vars
at line 106 in file classes/Link.php
101. if (is_array($product) && isset($product['id_product'])) {
102. $product = new Product($product['id_product'], false, $id_lang, $id_shop);
103. } elseif ((int)$product) {
104. $product = new Product((int)$product, false, $id_lang, $id_shop);
105. } else {
106. throw new PrestaShopException('Invalid product vars');
107. }
108. }
109.
110. // Set available keywords
111. $params = array();
124. $languages = Language::getLanguages();
125. $defaultLang = Configuration::get('PS_LANG_DEFAULT');
126. switch ($this->php_self) {
127. case 'product': // product page
128. $idProduct = (int) Tools::getValue('id_product');
129. $canonical = $this->context->link->getProductLink($idProduct);
130. $hreflang = $this->getHrefLang('product', $idProduct, $languages, $defaultLang);
131.
132. break;
133.
134. case 'category':
Argument [0] 0
89. return;
90. }
91.
92. if (isset($this->context->controller->php_self)) {
93. $this->php_self = $this->context->controller->php_self;
94. return $this->getSeoFields();
95. } else {
96. return $this->getDefaultSeoFields();
97. }
98. }
99.
582. }
583. }
584.
585. // Immediately return the result if we do not log performances
586. if (!Module::$_log_modules_perfs) {
587. return $module->{$method}($params);
588. }
589.
590. // Store time and memory before and after hook call and save the result in the database
591. $time_start = microtime(true);
592. $memory_start = memory_get_usage(true);
Argument [0]
537. Tools::waitUntilFileIsModified($moduleInstance->push_filename, $moduleInstance->push_time_limit);
538. }
539.
540. // Call hook method
541. if ($hook_callable) {
542. $display = Hook::coreCallHook($moduleInstance, 'hook'.$hook_name, $hook_args);
543. } elseif ($hook_retro_callable) {
544. $display = Hook::coreCallHook($moduleInstance, 'hook'.$retro_hook_name, $hook_args);
545. }
546.
547. // Live edit
Argument [0] Argument [1] hookdisplayHeader Argument [2]
574.
575. if (!$this->useMobileTheme()) {
576. // These hooks aren't used for the mobile theme.
577. // Needed hooks are called in the tpl files.
578. $this->context->smarty->assign(array(
579. 'HOOK_HEADER' => Hook::exec('displayHeader'),
580. 'HOOK_TOP' => Hook::exec('displayTop'),
581. 'HOOK_LEFT_COLUMN' => ($this->display_column_left ? Hook::exec('displayLeftColumn') : ''),
582. 'HOOK_RIGHT_COLUMN' => ($this->display_column_right ? Hook::exec('displayRightColumn', array('cart' => $this->context->cart)) : ''),
583. ));
584. } else {
Argument [0] displayHeader
170. * Assign template vars related to page content
171. * @see FrontController::initContent()
172. */
173. public function initContent()
174. {
175. parent::initContent();
176.
177. if (!$this->errors) {
178. if (Pack::isPack((int)$this->product->id) && !Pack::isInStock((int)$this->product->id)) {
179. $this->product->quantity = 0;
180. }
184. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
185. $this->initHeader();
186. }
187.
188. if ($this->viewAccess()) {
189. $this->initContent();
190. } else {
191. $this->errors[] = Tools::displayError('Access denied.');
192. }
193.
194. if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className))) {
362. if (isset($params_hook_action_dispatcher)) {
363. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
364. }
365.
366. // Running controller
367. $controller->run();
368. } catch (PrestaShopException $e) {
369. $e->displayMessage();
370. }
371. }
372.
53. {
54. Header('location:http://www.kvmswitches.co.in/');
55. exit;
56. }
57. require(dirname(__FILE__).'/config/config.inc.php');
58. Dispatcher::getInstance()->dispatch();