diff --git a/core/event.class.inc.php b/core/event.class.inc.php index 90d900257..6a731f1cc 100644 --- a/core/event.class.inc.php +++ b/core/event.class.inc.php @@ -39,7 +39,7 @@ class Event extends DBObject implements iDisplay MetaModel::Init_Params($aParams); //MetaModel::Init_InheritAttributes(); MetaModel::Init_AddAttribute(new AttributeText("message", array("allowed_values"=>null, "sql"=>"message", "default_value"=>null, "is_null_allowed"=>false, "depends_on"=>array()))); - MetaModel::Init_AddAttribute(new AttributeDateTime("date", array("allowed_values"=>null, "sql"=>"date", "default_value"=>"", "is_null_allowed"=>false, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeDateTime("date", array("allowed_values"=>null, "sql"=>"date", "default_value"=>"now", "is_null_allowed"=>false, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeString("userinfo", array("allowed_values"=>null, "sql"=>"userinfo", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array()))); // MetaModel::Init_AddAttribute(new AttributeString("userinfo", array("allowed_values"=>null, "sql"=>"userinfo", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array()))); diff --git a/tests/php-unit-tests/unitary-tests/core/EventIssueTest.php b/tests/php-unit-tests/unitary-tests/core/EventIssueTest.php index 62faa35a4..400a37180 100644 --- a/tests/php-unit-tests/unitary-tests/core/EventIssueTest.php +++ b/tests/php-unit-tests/unitary-tests/core/EventIssueTest.php @@ -62,7 +62,7 @@ class EventIssueTest extends ItopDataTestCase $oEventIssue->DBInsert(); } catch (CoreException $e) { - $this->fail('we should be able to persist the object though it contains long values in its attributes'); + $this->fail('we should be able to persist the object though it contains long values in its attributes: '.$e->getMessage()); } $this->assertTrue(true); }