From acdb240de4e4c8e5865af5293d339e47f91b3513 Mon Sep 17 00:00:00 2001 From: mDeflotte Date: Fri, 21 Oct 2011 15:09:15 +0000 Subject: [PATCH] // BugFix : undefined var in admin page product + bad ajax return git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9558 b9a71923-0436-4b27-9f14-aed3839534dd --- controllers/admin/AdminProductsController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php index 79b8ded86..8c393006d 100644 --- a/controllers/admin/AdminProductsController.php +++ b/controllers/admin/AdminProductsController.php @@ -1527,7 +1527,7 @@ if (false) $languages = Language::getLanguages(false); $defaultLanguage = (int)(Configuration::get('PS_LANG_DEFAULT')); $product = new Product((int)(Tools::getValue('id_product'))); - $content .= $this->initForm(); + $this->initForm(); return $this->{'initForm'.$this->action}($product, $languages, $defaultLanguage); } } @@ -1723,6 +1723,7 @@ if (false) public function displayForm($isMainTab = true) { + $content = ''; parent::displayForm(); if (!($obj = $this->loadObject(true))) throw new Exception('object not loaded'); @@ -3605,7 +3606,7 @@ switch ($this->action) $stock_available->save(); break; } - $this->content = Tools::jsonEncode(array('error' => false)); + die(Tools::jsonEncode(array('error' => false))); } public function getLineTableImage($image, $imagesTotal, $token, $shops)