From 21189048e7b7efafda508a746ae8fb60120f137e Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@destailleur.fr>
Date: Sat, 11 Mar 2017 00:50:31 +0100
Subject: [PATCH] FIX choice of category was lost if an error occurs during
 creation

---
 htdocs/projet/card.php | 1 +
 1 file changed, 1 insertion(+)

diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php
index 7c8a3e3a71a..1b0ccb36ed0 100644
--- a/htdocs/projet/card.php
+++ b/htdocs/projet/card.php
@@ -595,6 +595,7 @@ if ($action == 'create' && $user->rights->projet->creer)
     	// Categories
     	print '<tr><td>'.$langs->trans("Categories").'</td><td colspan="3">';
     	$cate_arbo = $form->select_all_categories(Categorie::TYPE_PROJECT, '', 'parent', 64, 0, 1);
+    	$arrayselected=GETPOST('categories', 'array');
     	print $form->multiselectarray('categories', $cate_arbo, $arrayselected, '', 0, '', 0, '100%');
     	print "</td></tr>";
     }
-- 
GitLab