mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-07 17:42:53 +01:00
Fix warning on date
This commit is contained in:
@@ -10059,9 +10059,9 @@ abstract class CommonObject
|
||||
/**
|
||||
* Create object in the database
|
||||
*
|
||||
* @param User $user User that creates
|
||||
* @param int<0,1> $notrigger 0=launch triggers after, 1=disable triggers
|
||||
* @return int<-1,max> Return integer <0 if KO, Id of created object if OK
|
||||
* @param User $user User that creates
|
||||
* @param int<0,1> $notrigger 0=launch triggers after, 1=disable triggers
|
||||
* @return int<-1,max> Return integer <0 if KO, Id of created object if OK
|
||||
*/
|
||||
public function createCommon(User $user, $notrigger = 0)
|
||||
{
|
||||
@@ -10080,6 +10080,7 @@ abstract class CommonObject
|
||||
if (array_key_exists('date_creation', $fieldvalues) && empty($fieldvalues['date_creation'])) {
|
||||
$fieldvalues['date_creation'] = $this->db->idate($now);
|
||||
}
|
||||
// For backward compatibility, if a property ->fk_user_creat exists and not filled.
|
||||
if (array_key_exists('fk_user_creat', $fieldvalues) && !($fieldvalues['fk_user_creat'] > 0)) {
|
||||
$fieldvalues['fk_user_creat'] = $user->id;
|
||||
$this->fk_user_creat = $user->id;
|
||||
|
||||
Reference in New Issue
Block a user