From 6ce006f853053a5e24daad7a128f3403de9002e2 Mon Sep 17 00:00:00 2001 From: quentin Date: Mon, 16 Nov 2020 15:46:16 +0100 Subject: [PATCH] FIX cant empty action comm desc --- htdocs/comm/action/card.php | 1 - htdocs/comm/action/class/actioncomm.class.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 129696a60d9..0709a2571ad 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -469,7 +469,6 @@ if (empty($reshook) && $action == 'update') $object->note_private = trim(GETPOST("note", "none")); $object->fk_element = GETPOST("fk_element", "int"); $object->elementtype = GETPOST("elementtype", "alphanohtml"); - if (!$datef && $percentage == 100) { $error++; $donotclearsession = 1; diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 3c060ffdc39..7355040e00c 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -983,7 +983,7 @@ class ActionComm extends CommonObject // Clean parameters $this->label = trim($this->label); - $this->note_private = dol_htmlcleanlastbr(trim(empty($this->note_private) ? $this->note : $this->note_private)); + $this->note_private = dol_htmlcleanlastbr(trim(!isset($this->note_private) ? $this->note : $this->note_private)); if (empty($this->percentage)) $this->percentage = 0; if (empty($this->priority) || !is_numeric($this->priority)) $this->priority = 0; if (empty($this->transparency)) $this->transparency = 0;