mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-20 17:18:51 +02:00
N°1342 cron : previous commit was to handle BackgroundTask pointing to non existing class (can happen after an extension removal)
add comment reflecting the class_exists() test purpose SVN:trunk[5372]
This commit is contained in:
@@ -186,7 +186,9 @@ function CronExec($oP, $aProcesses, $bVerbose)
|
||||
}
|
||||
|
||||
$sTaskClass = $oTask->Get('class_name');
|
||||
if (!class_exists($sTaskClass)) // we could also try/catch when instanciating ReflectionClass, but sometimes old recipes are good too ;)
|
||||
// The BackgroundTask can point to a non existing class : this could happen for example if an extension has been removed
|
||||
// we could also try/catch when instanciating ReflectionClass, but sometimes old recipes are good too ;)
|
||||
if (!class_exists($sTaskClass))
|
||||
{
|
||||
$oP->p("ERROR : the background task was paused because it references the non existing class '$sTaskClass'");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user