fix php warning

This commit is contained in:
Frédéric FRANCE 2021-06-20 16:24:58 +02:00 committed by GitHub
parent 23c0edf854
commit 4739694ad7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -870,7 +870,7 @@ class FormFile
// Show share link
$out .= '<td class="nowrap">';
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