From 6feaf88e92a5c3d2a301049cebceb53bb9d93702 Mon Sep 17 00:00:00 2001 From: Francois Suter Date: Sat, 19 Jun 2010 19:15:22 +0000 Subject: [PATCH] Fixed bug: #14184: Scheduler: Handle invalid serialized exception objects git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7972 709f56b5-9817-0410-a4d7-c38de5d9e867 --- ChangeLog | 4 ++++ typo3/sysext/scheduler/mod1/index.php | 8 +++++++- typo3/sysext/scheduler/mod1/locallang.xml | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9fa6d81f5446..a21e4cebe801 100755 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-06-19 Francois Suter + + * Fixed bug: #14184: Scheduler: Handle invalid serialized exception objects + 2010-06-19 Stanislas Rolland * Fixed bug #14464: htmlArea RTE: Type of block accumulation if the block is manually selected in Safari diff --git a/typo3/sysext/scheduler/mod1/index.php b/typo3/sysext/scheduler/mod1/index.php index b2b88604a2ff..f85feeac7c83 100755 --- a/typo3/sysext/scheduler/mod1/index.php +++ b/typo3/sysext/scheduler/mod1/index.php @@ -1118,8 +1118,14 @@ class tx_scheduler_Module extends t3lib_SCbase { // Check if the last run failed $failureOutput = ''; if (!empty($schedulerRecord['lastexecution_failure'])) { + // Try to get the stored exception object $exception = unserialize($schedulerRecord['lastexecution_failure']); - $failureDetail = sprintf($GLOBALS['LANG']->getLL('msg.executionFailureReport'), $exception->getCode(), $exception->getMessage()); + // If the exception could not be unserialized, issue a default error message + if ($exception === FALSE) { + $failureDetail = $GLOBALS['LANG']->getLL('msg.executionFailureDefault'); + } else { + $failureDetail = sprintf($GLOBALS['LANG']->getLL('msg.executionFailureReport'), $exception->getCode(), $exception->getMessage()); + } $failureOutput = ' ' . htmlspecialchars($GLOBALS['LANG']->getLL('status.failure')) . ''; } diff --git a/typo3/sysext/scheduler/mod1/locallang.xml b/typo3/sysext/scheduler/mod1/locallang.xml index 60d3f3d91dfa..286874c79d81 100644 --- a/typo3/sysext/scheduler/mod1/locallang.xml +++ b/typo3/sysext/scheduler/mod1/locallang.xml @@ -69,6 +69,7 @@ + -- 2.20.1