diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index c11f49d43ad..bc0a514dadb 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -503,7 +503,6 @@ if (empty($reshook) && $action == 'update') $object->note_private = trim(GETPOST("note", "restricthtml")); $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 c0885e4311a..aa5711a69ce 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -1000,7 +1000,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; diff --git a/htdocs/cron/class/cronjob.class.php b/htdocs/cron/class/cronjob.class.php index 9484c6a2331..e58abf24223 100644 --- a/htdocs/cron/class/cronjob.class.php +++ b/htdocs/cron/class/cronjob.class.php @@ -1052,7 +1052,10 @@ class Cronjob extends CommonObject $object = new $this->objectname($this->db); if ($this->entity > 0) $object->entity = $this->entity; // We work on a dedicated entity - $params_arr = array_map('trim', explode(",", $this->params)); + $params_arr = array(); + if (!empty($this->params) || $this->params === '0') { + $params_arr = array_map('trim', explode(",", $this->params)); + } if (!is_array($params_arr)) { diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 6c2faa0624d..a0acef35203 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -957,6 +957,7 @@ class Expedition extends CommonObject $langs->load("errors"); $this->error = $langs->trans('ErrorStockIsNotEnoughToAddProductOnShipment', $product->ref); $this->errorhidden = 'ErrorStockIsNotEnoughToAddProductOnShipment'; + $this->db->rollback(); return -3; } diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index fc732802eda..03d81d4fd64 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -4245,8 +4245,7 @@ class Product extends CommonObject $resql = $this->db->query($sql); if ($resql) { $obj = $this->db->fetch_object($resql); - if ($obj) { $nb = $obj->nb; - } + if ($obj) { $nb = $obj->nb; } } else { return -1; }