Issue and solution. Trashcan not available after delete of big file

The issue does not depend on the version.
It is in the Nexcloud code since I started using Nextcloud years ago and I ‘solve’ the issue after every upgrade.
After every upgrade the Trashcan is not available after deleting a big file of let’s say 2 GB.
The error in the log says :
Trash bin: AbstractTrash::getSize() must be of the type integer, float returned
So I edit the next file :
/var/www/html/nextcloud/apps/files_trashbin/lib/Sabre/AbstractTrash.php
and I force :

public function getSize(): int {
	return $this->data->getSize();
}

to return an integer by adding (int) :

public function getSize(): int {
    return (int)$this->data->getSize();
}

After that the trashbin is available again.
Until after the next upgrade…
Maybe this can be fixed in future versions ?

Many thanks,

Jack