fix php8 warning

This commit is contained in:
Frédéric FRANCE 2021-03-19 17:01:14 +01:00 committed by GitHub
parent 3414511d7f
commit 93ae7a3fed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1778,7 +1778,7 @@ class FormFile
// Share link
print '<td class="right">';
if ($file['share']) {
if (!empty($file['share'])) {
// Define $urlwithroot
$urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));
$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file