FIX Calling soc.php with an unknown socid display a message
Fix #4632 Calling soc.php with an unknown socid display a simple error message
This commit is contained in:
parent
bd1d076753
commit
4b4dc8fe0d
@ -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
|
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||||
$hookmanager->initHooks(array('thirdpartycard','globalcard'));
|
$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)
|
// Get object canvas (By default, this is not defined, so standard usage of dolibarr)
|
||||||
$object->getCanvas($socid);
|
$object->getCanvas($socid);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user