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();
146. $languages = Language::getLanguages(false);
147. foreach ($languages AS $key => $lang) {
148. if ($page == 'index') {
149. $array_of_links[$lang['language_code']]['url'] = $this->context->link->getPageLink('index', true, $lang['id_lang']);
150. } elseif ($page == 'product') {
151. $array_of_links[$lang['language_code']]['url'] = $this->context->link->getProductLink(Tools::getValue('id_product'), null, null, null, $lang['id_lang']);
152. } elseif ($page == 'category') {
153. $array_of_links[$lang['language_code']]['url'] = $this->context->link->getCategoryLink(Tools::getValue('id_category'), null, $lang['id_lang']);
154. } elseif ($page == 'manufacturer') {
155. $array_of_links[$lang['language_code']]['url'] = $this->context->link->getManufacturerLink(Tools::getValue('id_manufacturer'), null, $lang['id_lang']);
156. } elseif ($page == 'supplier') {
Argument [0] Argument [1] Argument [2] Argument [3] Argument [4] 1
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]
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
548. if (!$array_return && $array['live_edit'] && Tools::isSubmit('live_edit') && Tools::getValue('ad')
549. && Tools::getValue('liveToken') == Tools::getAdminToken('AdminModulesPositions'
Argument [0] Argument [1] hookHeader 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
167. * Assign template vars related to page content
168. * @see FrontController::initContent()
169. */
170. public function initContent()
171. {
172. parent::initContent();
173.
174. if (!$this->errors) {
175. if (Pack::isPack((int)$this->product->id) && !Pack::isInStock((int)$this->product->id)) {
176. $this->product->quantity = 0;
177. }
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.
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();