// 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:
rMalie
2012-01-03 12:57:16 +00:00
parent 7eb31e07ea
commit c6f10b628c
+2 -2
View File
@@ -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