Skip to content

Commit 5f385bb

Browse files
committed
fix(abstractitiltarget): glpi 10.0.3 will require a data with a valid value
1 parent ba6d4a5 commit 5f385bb

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

inc/abstractitiltarget.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2255,7 +2255,7 @@ public function getDefaultData(PluginFormcreatorFormAnswer $formanswer): array {
22552255
}
22562256

22572257
// Manage special values
2258-
if (isset($predefined_fields['date']) && $predefined_fields['date'] == 'NOW') {
2258+
if (!isset($predefined_fields['date']) || isset($predefined_fields['date']) && $predefined_fields['date'] == 'NOW') {
22592259
$predefined_fields['date'] = $_SESSION['glpi_currenttime'];
22602260
}
22612261

inc/targetticket.class.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -836,6 +836,7 @@ public function save(PluginFormcreatorFormAnswer $formanswer): ?CommonDBTM {
836836
);
837837
$data['name'] = Toolbox::addslashes_deep($data['name']);
838838
$data['name'] = $formanswer->parseTags($data['name'], $this);
839+
$data['date'] = $_SESSION['glpi_currenttime'];
839840

840841
$data['content'] = $this->prepareTemplate(
841842
$this->fields['content'],

0 commit comments

Comments
 (0)