From af09a3714b3ea937730cb171b008635429d94bc8 Mon Sep 17 00:00:00 2001 From: atm-quentin Date: Tue, 13 Mar 2018 17:12:03 +0100 Subject: [PATCH] FIX reverse field to have object loaded in doaction --- htdocs/societe/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 42abde0e09b..204eff383d5 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -73,7 +73,7 @@ $extralabels=$extrafields->fetch_name_optionals_label($object->table_element); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('thirdpartycard','globalcard')); -if ($action == 'view' && $object->fetch($socid)<=0) +if ($object->fetch($socid)<=0 && $action == 'view') { $langs->load("errors"); print($langs->trans('ErrorRecordNotFound'));