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();
526. if (!empty($context->controller->php_self)) {
527. $controller = $context->controller->php_self;
528. }
529.
530. if ($controller == 'product' && isset($params['id_product'])) {
531. return $this->getProductLink((int)$params['id_product'], null, null, null, (int)$id_lang);
532. } elseif ($controller == 'category' && isset($params['id_category'])) {
533. return $this->getCategoryLink((int)$params['id_category'], null, (int)$id_lang);
534. } elseif ($controller == 'supplier' && isset($params['id_supplier'])) {
535. return $this->getSupplierLink((int)$params['id_supplier'], null, (int)$id_lang);
536. } elseif ($controller == 'manufacturer' && isset($params['id_manufacturer'])) {
Argument [0] 0 Argument [1] Argument [2] Argument [3] Argument [4] 2
218. */
219. public function canonizeURL($context, $url = null)
220. {
221. // Default to the current url if necessary
222. if (is_null($url) || $url == '') {
223. $url = $context->link->getLanguageLink($context->language->id);
224. }
225.
226. // Skip URLs of white-listed controllers
227. if (!in_array($context->controller->php_self, $this->system_wl_controllers)) {
228. $url_comp = parse_url($url);
Argument [0] 2
313. public function getCanonicalLinkForSmarty($context)
314. {
315. $ret_string = null;
316.
317. if ($this->canonical_active) {
318. $canonical_link = $this->canonizeURL($context);
319. if ($this->canonical_all_pages || $canonical_link != CanonicalLinkManager::getCurrentPageURL()) {
320. $ret_string = $canonical_link;
321. }
322. }
323.
Argument [0]
328. */
329. public function hookDisplayHeader()
330. {
331. $rlm = CanonicalLinkManager::getInstance();
332.
333. $this->context->smarty->assign('canonical_link', $rlm->getCanonicalLinkForSmarty($this->context));
334. $this->context->smarty->assign('canonicallanglinks', $rlm->getHreflangLinksForSmarty($this->context));
335.
336. return $this->display(__FILE__, 'head.tpl');
337. }
338. }
Argument [0]
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
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();