88103[BUGFIX] Prevent calls on null in scheduler module
Commit message
Review
-
Code review CR +2 Done
- Christian Kuhn +2
- Stefan Bürk +1
-
Verified V +2 Done
- Christian Kuhn +2
- Stefan Bürk +1
- core-ci +1 CI
Issues 1
Files 1
Review log 1317
-
Lina Wolf uploaded patch set 1 02/08/25, 13:14
-
core-ci voted on patch set 1 V -1 02/08/25, 13:21 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73805
-
Lina Wolf uploaded patch set 2
V -102/08/25, 14:41 -
core-ci voted on patch set 2 V +1 02/08/25, 14:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73806
-
Stefan Bürk commented on patch set 2 02/08/25, 21:32
SchedulerModuleController.php:412Unrelated, but `$e` is not used in the catch block and can be removed.SchedulerModuleController.php:427This exception here does not serve any purpose at all and is directly catched. As already mentioned for the change above, this is a missue of exception communication here. I would rather change the whole code-block here (L423-429) to ```php $task = null; $class = null; $isInvalidTask = false; try { if (isset($taskRecord['serialized_task_object']) && is_string($taskRecord['serialized_task_object']) && $taskRecord['serialized_task_object'] !== '' ) { $task = $this->taskSerializer->deserialize($taskRecord['serialized_task_object']); $class = $this->taskSerializer->resolveClassName($task); } } catch (InvalidTaskException) { $isInvalidTask = true; $class = $this->taskSerializer->extractClassName($taskRecord['serialized_task_object']); } ``` What do you think ? -
Lina Wolf uploaded patch set 3
V +102/09/25, 06:48 -
Lina Wolf commented on patch set 3 02/09/25, 06:51
SchedulerModuleController.php:410ReplyThis sounds like a good idea. I applied your changes and left a todo about why we catch this one exception here. As the catch block has been there before my change I wouldnt feel save to remove it.SchedulerModuleController.php:412ReplyDoneSchedulerModuleController.php:427ReplyLooks much cleaner to me however I would move the if block outside the try block as calling extractClassName also expects a string. -
Lina Wolf commented on patch set 3 02/09/25, 06:53
SchedulerModuleController.php:138CGL insists on changing these lines although i never touchted them. No idea why. -
core-ci voted on patch set 3 V +1 02/09/25, 06:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73829
-
Christian Kuhn uploaded patch set 4
V +102/09/25, 18:25 -
Christian Kuhn commented on patch set 3 02/09/25, 18:26
SchedulerModuleController.php:138Replyprobably because of trailing ',' ... streamlined now. -
Christian Kuhn commented on patch set 4 02/09/25, 18:26
SchedulerModuleController.php:410ReplyDoneSchedulerModuleController.php:427ReplyDone -
Christian Kuhn commented on patch set 4 02/09/25, 18:27
SchedulerModuleController.php:410ReplyDoneSchedulerModuleController.php:427ReplyDone -
core-ci voted on patch set 4 V +1 02/09/25, 18:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73854
-
Stefan Bürk voted on patch set 4 CR +1 V +1 02/09/25, 19:02
-
Christian Kuhn voted on patch set 4 CR +2 V +2 02/09/25, 19:23
-
Christian Kuhn merged patch set 5 02/09/25, 19:34
SchedulerModuleController.php:410