Skip to content

don't hard error when trying to load profiles with no profiler registered - #33292

Merged
icewind1991 merged 1 commit into
masterfrom
no-profiler
Apr 5, 2023
Merged

don't hard error when trying to load profiles with no profiler registered#33292
icewind1991 merged 1 commit into
masterfrom
no-profiler

Conversation

@icewind1991

Copy link
Copy Markdown
Member

instead just return empty results

@icewind1991icewind1991 added the 3. to review Waiting for reviews label Jul 20, 2022
@icewind1991icewind1991 added this to the Nextcloud 25 milestone Jul 20, 2022
@icewind1991
icewind1991 requested a review from a teamJuly 20, 2022 13:50

@PVince81PVince81 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

@PVince81

Copy link
Copy Markdown
Member

@icewind1991 please always make sure to have 4-5 reviewers lined up to increase the probability

This was referenced Aug 12, 2022
This was referenced Aug 24, 2022
This was referenced Sep 6, 2022
@skjnldsvskjnldsv mentioned this pull request Sep 15, 2022
This was referenced Sep 20, 2022
@blizzzblizzz modified the milestones: Nextcloud 25, Nextcloud 26Sep 22, 2022
@icewind1991
icewind1991 requested review from a team, blizzz and juliusknorr and removed request for a teamOctober 17, 2022 16:18
@blizzzblizzz mentioned this pull request Feb 1, 2023
@skjnldsvskjnldsv mentioned this pull request Feb 23, 2023
@blizzzblizzz mentioned this pull request Mar 7, 2023
@blizzzblizzz modified the milestones: Nextcloud 26, Nextcloud 27Mar 9, 2023
…ered
Signed-off-by: Robin Appelman <robin@icewind.nl>
@icewind1991
icewind1991 requested a review from come-ncApril 5, 2023 12:50
Comment on lines +64 to +68
if ($this->storage) {
return $this->storage->read($token);
} else {
return null;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
if ($this->storage) {
return$this->storage->read($token);
} else {
returnnull;
}
return$this->storage?->read($token);

For the record, you can use the nullsafe operator in PHP 8 for this.

@icewind1991
icewind1991 merged commit 63fc83d into masterApr 5, 2023
@icewind1991
icewind1991 deleted the no-profiler branch April 5, 2023 13:57
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@icewind1991@PVince81@juliusknorr@come-nc@blizzz@skjnldsv