It can happen that content that was previously counted no longer exists and therefore fewer runs are required than initially assumed. This can happen if, for example, a user's posts and threads are deleted and the user has only written posts in his or her own threads (the posts are then deleted along with the threads). This may have led to errors before because an empty list of objects was passed.
$objectList = $processor->getContentListForUser($this->user);
$objectList->sqlLimit = $this->limit;
$objectList->readObjectIDs();
- $processor->deleteContent($objectList->objectIDs);
+ if (!empty($objectList->objectIDs)) {
+ $processor->deleteContent($objectList->objectIDs);
+ }
$this->data['provider'][$providerObjectType]['count'] -= $this->limit;