[-] CORE : Merge of https://github.com/PrestaShop/PrestaShop/pull/816
This commit is contained in:
+5
-1
@@ -152,7 +152,11 @@ class CartCore extends ObjectModel
|
||||
|
||||
public function __construct($id = null, $id_lang = null)
|
||||
{
|
||||
parent::__construct($id, $id_lang);
|
||||
parent::__construct($id);
|
||||
|
||||
if (!is_null($id_lang))
|
||||
$this->id_lang = (int)(Language::getLanguage($id_lang) !== false) ? $id_lang : Configuration::get('PS_LANG_DEFAULT');
|
||||
|
||||
if ($this->id_customer)
|
||||
{
|
||||
if (isset(Context::getContext()->customer) && Context::getContext()->customer->id == $this->id_customer)
|
||||
|
||||
@@ -122,7 +122,10 @@ class EmployeeCore extends ObjectModel
|
||||
|
||||
public function __construct($id = null, $id_lang = null, $id_shop = null)
|
||||
{
|
||||
parent::__construct($id, $id_lang, $id_shop);
|
||||
parent::__construct($id, null, $id_shop);
|
||||
|
||||
if (!is_null($id_lang))
|
||||
$this->id_lang = (int)(Language::getLanguage($id_lang) !== false) ? $id_lang : Configuration::get('PS_LANG_DEFAULT');
|
||||
|
||||
if ($this->id)
|
||||
$this->associated_shops = $this->getAssociatedShops();
|
||||
|
||||
Reference in New Issue
Block a user