Merge pull request #17571 from frederic34/patch-8

fix php8 warnings
This commit is contained in:
Laurent Destailleur 2021-05-11 17:59:29 +02:00 committed by GitHub
commit f2d70e2be0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,6 +37,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
$langs->loadLangs(array("companies", "other", "ticket", "mails"));
$id = GETPOST('id', 'int');
$socid = GETPOST('socid', 'int');
$ref = GETPOST('ref', 'alpha');
$track_id = GETPOST('track_id', 'alpha');
$action = GETPOST('action', 'alpha');
@ -104,7 +105,7 @@ if ($object->id) {
print dol_get_fiche_end();
}
if (!$user->socid && $conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY) {
if (!$user->socid && !empty($conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY)) {
$object->next_prev_filter = "te.fk_user_assign = '".$user->id."'";
} elseif ($user->socid > 0) {
$object->next_prev_filter = "te.fk_soc = '".$user->socid."'";