Merge pull request #6105 from jpfox/patch-1

FIX Calling soc.php with an unknown socid display a message
This commit is contained in:
Laurent Destailleur 2016-12-10 11:54:19 +01:00 committed by GitHub
commit 5f432bd738

View File

@ -72,6 +72,12 @@ $extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
$hookmanager->initHooks(array('thirdpartycard','globalcard'));
if ($action == 'view' && $object->fetch($socid)<=0)
{
$langs->load("errors");
print($langs->trans('ErrorRecordNotFound'));
exit;
}
// Get object canvas (By default, this is not defined, so standard usage of dolibarr)
$object->getCanvas($socid);