Skip to content

Conversation

Hafsa-Naeem
Copy link
Contributor

@Hafsa-Naeem Hafsa-Naeem force-pushed the i10263-stable_3_5_0-follow-up branch from 83bc2c8 to 9bab057 Compare August 27, 2025 02:03
@Hafsa-Naeem Hafsa-Naeem changed the title pkp/pkp-lib#10263 Submodule update ##Hafsa-Naeem/i10263-stable_3_5_0-follow-up pkp/pkp-lib#10263 Fix submission mapper crash when review assignments are null Aug 27, 2025
@Hafsa-Naeem Hafsa-Naeem force-pushed the i10263-stable_3_5_0-follow-up branch from ef8af99 to e88f603 Compare August 27, 2025 02:26
@@ -76,14 +76,18 @@ protected function mapByProperties(array $props, Submission $submission, bool|Co

$reviewRounds = $this->getGroupedReviewRoundsFromSubmission($submission);
$currentReviewRound = $reviewRounds->flatten()->sort()->last(); /** @var ReviewRound|null $currentReviewRound */
// normalizing possibly null collections
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Hafsa-Naeem, are these changes due to a case you encountered where $stageAssignments or $reviewAssignments is null? Or is it just the potential for that situation based e.g. on the typehint in the class?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@asmecher Yes, this was from a real case in OMP. After allowing managers/editors to access submissions they're not assigned to, the reviewAssignments and stageAssignments were null and caused a fatal error in mapByProperties().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants