check if workflow exists in sendRequestWorkflowActionMail()

This commit is contained in:
Uwe Steinmann 2021-08-30 19:40:10 +02:00
parent a4276a42a9
commit aadcbbd979

View File

@ -1076,11 +1076,11 @@ class SeedDMS_NotificationService {
public function sendRequestWorkflowActionMail($content, $user, $transition=null) { /* {{{ */
$document = $content->getDocument();
$folder = $document->getFolder();
if(!($workflow = $content->getWorkflow()))
return;
if($transition) {
$workflow = $transition->getWorkflow();
$state = $transition->getNextState();
} else {
$workflow = $content->getWorkflow();
$state = $workflow->getInitState();
}