Commit d975ed57 authored by Mathias Schreiber's avatar Mathias Schreiber Committed by Benni Mack
Browse files

[BUGFIX] Scheduler now throws OutOfBoundsException on SQL query error

If the query for fetchTask fails for whatever reason, scheduler will
now gracefully throw an exception instead of assuming it had gotten
a valid resource pointer

Resolves: #67463
Related: #39085
Releases: master, 6.2
Change-Id: I26819df3fd173b36de6121100a6398ed4b701319
Reviewed-on: http://review.typo3.org/40256


Reviewed-by: default avatarLienhart Woitok <lienhart.woitok@netlogix.de>
Tested-by: default avatarLienhart Woitok <lienhart.woitok@netlogix.de>
Reviewed-by: Stephan Großberndt's avatarStephan Großberndt <stephan@grossberndt.de>
Reviewed-by: Benni Mack's avatarBenjamin Mack <benni@typo3.org>
Tested-by: Benni Mack's avatarBenjamin Mack <benni@typo3.org>
parent bdf8eae2
......@@ -279,7 +279,7 @@ class Scheduler implements \TYPO3\CMS\Core\SingletonInterface {
$db = $this->getDatabaseConnection();
$res = $db->exec_SELECT_queryArray($queryArray);
if ($res === FALSE) {
throw new \UnexpectedValueException('Query could not be executed. Possible defect in tables tx_scheduler_task or tx_scheduler_task_group', 1422044826);
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 there are no available tasks, thrown an exception
if ($db->sql_num_rows($res) == 0) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment