From b999b0bb82dfb6a620af476fb8b27b3a6cc14873 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Oct 2016 21:04:04 +0200 Subject: [PATCH] Fix dead code --- .../interface_50_modAgenda_ActionsAuto.class.php | 2 -- htdocs/loan/class/loan.class.php | 11 ++++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php index 61db64e8c97..bce6cd02eee 100644 --- a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php +++ b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php @@ -872,8 +872,6 @@ class InterfaceActionsAuto extends DolibarrTriggers dol_syslog("interface_modAgenda_ActionsAuto.class.php: ".$this->error, LOG_ERR); return -1; } - - return 0; } } diff --git a/htdocs/loan/class/loan.class.php b/htdocs/loan/class/loan.class.php index 60d4050148a..5c57764bf97 100644 --- a/htdocs/loan/class/loan.class.php +++ b/htdocs/loan/class/loan.class.php @@ -99,15 +99,15 @@ class Loan extends CommonObject $this->account_capital = $obj->accountancy_account_capital; $this->account_insurance = $obj->accountancy_account_insurance; $this->account_interest = $obj->accountancy_account_interest; - - return 1; + $this->db->free($resql); + return 1; } else { + $this->db->free($resql); return 0; } - $this->db->free($resql); } else { @@ -482,13 +482,14 @@ class Loan extends CommonObject if (empty($obj->fk_user_modif)) $obj->tms = ""; $this->date_modification = $this->db->jdate($obj->tms); + $this->db->free($result); return 1; } else { - return 0; + $this->db->free($result); + return 0; } - $this->db->free($result); } else {