Cron job fails ReviewReminder after OJS 3.2.1 upgrade

Dear @asmecher

The original problem that the review reminders are not sent did not give any error messages (what I could find). And now suddenly the script started working! - I don’t know why and how! But Saturday morning the cron job was run, and according to review_assignments table a lot of emails were sent!

However, I still have some orphan submissions left.

MariaDB [ojs]> SELECT s.submission_id, s.context_id FROM submissions s LEFT JOIN journals j ON (s.context_id = j.journal_id) WHERE j.journal_id IS NULL;
+---------------+------------+
| submission_id | context_id |
+---------------+------------+
|           429 |          1 |
|           430 |          1 |
|           431 |          1 |
+---------------+------------+
3 rows in set (0.00 sec)

This is the error from trying to delete a submission without journal:

# php deleteSubmissions.php 429
PHP Fatal error:  Uncaught Error: Call to a member function getId() on null in /var/www/html/journal/lib/pkp/classes/notification/managerDelegate/PKPEditingProductionStatusNotificationManager.inc.php:78
Stack trace:
#0 /var/www/html/journal/lib/pkp/classes/notification/PKPNotificationManager.inc.php(338): PKPEditingProductionStatusNotificationManager->updateNotification(Object(Request), NULL, 1048585, 429)
#1 /var/www/html/journal/lib/pkp/classes/services/PKPSubmissionFileService.inc.php(562): PKPNotificationManager->updateNotification(Object(Request), Array, NULL, 1048585, 429)
#2 /var/www/html/journal/lib/pkp/classes/submission/PKPSubmissionDAO.inc.php(129): PKP\Services\PKPSubmissionFileService->delete(Object(SubmissionFile))
#3 /var/www/html/journal/classes/submission/SubmissionDAO.inc.php(51): PKPSubmissionDAO->deleteById('429')
#4 /var/www/html/journal/tools/deleteSubmissions.php(56): SubmissionDAO->deleteById('429')
#5 /var/www/html/journal/tools/deleteSubmissions.php(62): SubmissionDeletionTool->execute()
#6 {main}
  t in /var/www/html/journal/lib/pkp/classes/notification/managerDelegate/PKPEditingProductionStatusNotificationManager.inc.php on line 78

@eddoff