Skip to content
Snippets Groups Projects

Issue #3262872: Call to a member function getDisplayName() on null

@@ -362,16 +362,10 @@ class UltimateCronCommands extends DrushCommands {
throw new \Exception(dt('@name is not running', ['@name' => $job->id()]));
}
// Unlock the process.
if ($job->unlock($lock_id, TRUE)) {
$log_entry = $job->resumeLog($lock_id);
global $user;
$this->logger->warning('@name manually unlocked by user @username (@uid)', [
'@name' => $job->id(),
'@username' => $user->getDisplayName(),
'@uid' => $user->id(),
]);
$log_entry->finish();
// Unlock the process.
if ($job->unlock($lock_id, TRUE)) {
$log_entry = $job->resumeLog($lock_id);
$log_entry->finish();
$this->output->writeln(dt('Cron job @name unlocked', ['@name' => $job->id()]));
}
Loading