[BUGFIX] Scheduler BE module fails to load due to autoloader issues
authorChristian Kuhn <lolli@schwarzbu.ch>
Sun, 29 Jan 2012 12:04:03 +0000 (13:04 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 18 Feb 2012 11:53:06 +0000 (12:53 +0100)
When displaying a list of tasks, scheduler unserializes exceptions.
If the exception class is not known to the autoloader, PHP will
return an instance of _PHP_Incomplete_Class. This instance is
tested for to prevent a fatal error.

Change-Id: Ic3a4bf4bb9281602ca396641f5fbff0470feaeae
Resolves: #33116
Releases: 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/8896
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/scheduler/class.tx_scheduler_module.php

index 7d0ef75..2848f62 100644 (file)
@@ -1134,7 +1134,7 @@ class tx_scheduler_Module extends t3lib_SCbase {
                                                        /** @var $exception Exception */
                                                $exception = unserialize($schedulerRecord['lastexecution_failure']);
                                                        // If the exception could not be unserialized, issue a default error message
-                                               if ($exception === FALSE) {
+                                               if ($exception === FALSE || ($exception instanceof __PHP_Incomplete_Class)) {
                                                        $failureDetail = $GLOBALS['LANG']->getLL('msg.executionFailureDefault');
                                                } else {
                                                        $failureDetail = sprintf($GLOBALS['LANG']->getLL('msg.executionFailureReport'), $exception->getCode(), $exception->getMessage());
@@ -1598,4 +1598,4 @@ class tx_scheduler_Module extends t3lib_SCbase {
 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/scheduler/class.tx_scheduler_module.php'])) {
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/scheduler/class.tx_scheduler_module.php']);
 }
-?>
+?>
\ No newline at end of file