Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix \OC_App::getCurrentApp() when being called from CLI or phpunit #31876

Merged
merged 2 commits into from
Apr 7, 2022

Conversation

nickvergessen
Copy link
Member

@nickvergessen nickvergessen commented Apr 7, 2022

Fixes the failing tests in activity: nextcloud/activity#777

Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen nickvergessen added bug 3. to review Waiting for reviews labels Apr 7, 2022
@nickvergessen nickvergessen added this to the Nextcloud 24 milestone Apr 7, 2022
@nickvergessen nickvergessen requested review from come-nc, a team, blizzz and skjnldsv and removed request for a team April 7, 2022 12:09
Comment on lines +632 to +634
if (\OC::$CLI) {
return '';
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this related? What does it fix?

Copy link
Member Author

Choose a reason for hiding this comment

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

It fixes the case when this is called via cron/cli/occ
We don't need to do anything in that case, but it's not set to true when running tests

Signed-off-by: Joas Schilling <coding@schilljs.com>
@blizzz blizzz mentioned this pull request Apr 7, 2022
@PVince81 PVince81 merged commit 018ca43 into master Apr 7, 2022
@PVince81 PVince81 deleted the bugfix/noid/fix-getCurrentApp-from-cli branch April 7, 2022 15:09
@nickvergessen
Copy link
Member Author

/backport to stable23

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

Successfully merging this pull request may close these issues.

5 participants