Update files.lib.php

This commit is contained in:
Laurent Destailleur 2020-10-14 17:35:14 +02:00 committed by GitHub
parent 98eb11be62
commit ba001803ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1746,7 +1746,7 @@ function addFileIntoDatabaseIndex($dir, $file, $fullpathorig = '', $mode = 'uplo
$ecmfile->description = ''; // indexed content
$ecmfile->keyword = ''; // keyword content
if(! is_null($object) && ! empty($object->id)) {
if (is_object($object) && $object->id > 0) {
$ecmfile->src_object_id = $object->id;
$ecmfile->src_object_type = $object->element;
}