diff --git a/typo3/sysext/scheduler/Classes/Scheduler.php b/typo3/sysext/scheduler/Classes/Scheduler.php index 460ad083434647d4a8f07031c9c363ea65200e4b..e36a0f6fbf881a2f6bae21b83b68fee29b4832ef 100644 --- a/typo3/sysext/scheduler/Classes/Scheduler.php +++ b/typo3/sysext/scheduler/Classes/Scheduler.php @@ -334,12 +334,13 @@ class Scheduler implements SingletonInterface, LoggerAwareInterface } $row = $queryBuilder->execute()->fetch(); - if ($row === false) { - throw new \OutOfBoundsException('Query could not be executed. Possible defect in tables tx_scheduler_task or tx_scheduler_task_group or DB server problems', 1422044826); - } if (empty($row)) { - // If there are no available tasks, thrown an exception - throw new \OutOfBoundsException('No task', 1247827244); + if (empty($uid)) { + // No uid was passed and no overdue task was found + throw new \OutOfBoundsException('No tasks available for execution', 1247827244); + } + // Although a uid was passed, no task with given was found + throw new \OutOfBoundsException('No task with id ' . $uid . ' found', 1422044826); } /** @var Task\AbstractTask $task */ $task = unserialize($row['serialized_task_object']);