FIX php8 compatibility

This commit is contained in:
Philippe GRAND 2022-08-28 14:08:27 +02:00
parent 2d0537e823
commit d9b21380f6

View File

@ -407,7 +407,7 @@ class EcmFiles extends CommonObject
$sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t';
$sql .= ' WHERE 1 = 1';
/* Fetching this table depends on filepath+filename, it must not depends on entity because filesystem on disk does not know what is Dolibarr entities
if (! empty($conf->multicompany->enabled)) {
if (isModEnabled('multicompany')) {
$sql .= " AND entity IN (" . getEntity('ecmfiles') . ")";
}*/
if ($relativepath) {
@ -546,7 +546,7 @@ class EcmFiles extends CommonObject
}
$sql .= ' WHERE 1 = 1';
/* Fetching this table depends on filepath+filename, it must not depends on entity
if (! empty($conf->multicompany->enabled)) {
if (isModEnabled('multicompany')) {
$sql .= " AND entity IN (" . getEntity('ecmfiles') . ")";
}*/
if (count($sqlwhere) > 0) {