[BUGFIX] Scheduler: Removed call to deprecated method render() 64/46864/2
authorMichael Oehlhof <typo3@oehlhof.de>
Sun, 14 Feb 2016 19:40:03 +0000 (20:40 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Tue, 23 Feb 2016 21:53:02 +0000 (22:53 +0100)
Call of FlashMessage->render() if the task object is not valid
was replaced with appropriate code.

Resolves: #73427
Releases: master, 7.6
Change-Id: I2f21e46814d369519756f35b27ee7b546a6b6938
Reviewed-on: https://review.typo3.org/46864
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php

index 8000d4e..f48ec36 100644 (file)
@@ -1192,9 +1192,12 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas
                     } else {
                         // The task object is not valid
                         // Prepare to issue an error
-                        /** @var $flashMessage FlashMessage */
-                        $flashMessage = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Messaging\FlashMessage::class, sprintf($this->getLanguageService()->getLL('msg.invalidTaskClass'), $class), '', FlashMessage::ERROR);
-                        $executionStatusOutput = $flashMessage->render();
+                        $executionStatusOutput = '<span class="label label-danger">'
+                            . htmlspecialchars(sprintf(
+                                $this->getLanguageService()->getLL('msg.invalidTaskClass'),
+                                $class
+                            ))
+                            . '</span>';
                         $table[] =
                             '<tr>'
                                 . '<td>' . $startExecutionElement . '</td>'