From 91bfa4be6cb9022f7474cb53cc8518feeff6c4f1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 21 Aug 2018 13:10:20 +0200 Subject: [PATCH] Update project.class.php --- htdocs/projet/class/project.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index ebc887ccbb6..59a8db62dab 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -714,14 +714,15 @@ class Project extends CommonObject /** * Delete tasks with no children first, then task with children recursively * - * @param int <0 if KO, 1 if OK + * @param User $user User + * @return int <0 if KO, 1 if OK */ function deleteTasks($user) { $countTasks = count($this->lines); $deleted = false; if ($countTasks) - { + { foreach($this->lines as $task) { if ($task->hasChildren() <= 0) { // If there is no children (or error to detect them)