// Use property_exists instead of array_key_exists in ObjectModel
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12056 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -375,9 +375,9 @@ abstract class ObjectModelCore
|
||||
Hook::exec('actionObject'.get_class($this).'AddBefore', array('object' => $this));
|
||||
|
||||
// Automatically fill dates
|
||||
if ($autodate && array_key_exists('date_add', $this))
|
||||
if ($autodate && property_exists($this, 'date_add'))
|
||||
$this->date_add = date('Y-m-d H:i:s');
|
||||
if ($autodate && array_key_exists('date_upd', $this))
|
||||
if ($autodate && property_exists($this, 'date_upd'))
|
||||
$this->date_upd = date('Y-m-d H:i:s');
|
||||
|
||||
// Database insertion
|
||||
|
||||
Reference in New Issue
Block a user