// Fixed warning on WS #PSCFV-3689
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16915 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -270,7 +270,7 @@ abstract class ObjectModelCore
|
||||
$fields = array_merge($fields, $this->getFieldsShop());
|
||||
|
||||
// Ensure that we get something to insert
|
||||
if (!$fields && $this->id)
|
||||
if (!$fields && isset($this->id) && Validate::isUnsignedId($this->id))
|
||||
$fields[$this->def['primary']] = $this->id;
|
||||
return $fields;
|
||||
}
|
||||
@@ -286,7 +286,7 @@ abstract class ObjectModelCore
|
||||
public function getFieldsShop()
|
||||
{
|
||||
$fields = $this->formatFields(self::FORMAT_SHOP);
|
||||
if (!$fields && $this->id)
|
||||
if (!$fields && isset($this->id) && Validate::isUnsignedId($this->id))
|
||||
$fields[$this->def['primary']] = $this->id;
|
||||
return $fields;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user