From 84b5888cd56589dcdbab49592606115703747046 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 28 Feb 2015 10:45:48 +0100 Subject: [PATCH] Update card.php --- htdocs/projet/card.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index 0f6a74f1a48..a862cff0f40 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -51,9 +51,14 @@ $object = new Project($db); $extrafields = new ExtraFields($db); if ($id > 0 || ! empty($ref)) { - $object->fetch($id,$ref); - $object->fetch_thirdparty(); - $id=$object->id; + $ret = $object->fetch($id,$ref); + if ($ret > 0) { + $object->fetch_thirdparty(); + $id=$object->id; + } else { + setEventMessage($object->error, 'errors'); + $action=''; + } } // Security check