// 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:
1 parent
7eb31e07ea
commit
c6f10b628c
1 file changed
+2
-2
@@ -375,9 +375,9 @@ abstract class ObjectModelCore
|
|||||||
Hook::exec('actionObject'.get_class($this).'AddBefore', array('object' => $this));
|
Hook::exec('actionObject'.get_class($this).'AddBefore', array('object' => $this));
|
||||||
|
|
||||||
// Automatically fill dates
|
// 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');
|
$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');
|
$this->date_upd = date('Y-m-d H:i:s');
|
||||||
|
|
||||||
// Database insertion
|
// Database insertion
|
||||||
|
|||||||
Reference in new issue
Block a user