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:
Pierre Goiffon
2018-02-27 15:49:03 +00:00
parent d8c141b1c9
commit 79381d7fd2

View File

@@ -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'");