Uh oh!
There was an error while loading. Please reload this page.
getAppInfo has to return array - #8503
Closed
blizzz wants to merge 1 commit into
Closed
Conversation
blizzz
requested review from
MorrisJobke, juliusknorr, nickvergessen and rullzerFebruary 22, 2018 13:25
nickvergessen
commented
Feb 22, 2018
Member
Add |
null causes exceptions down the road Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
blizzzforce-pushed
the
fix-appinfo-return-val
branch
from
February 22, 2018 13:32
3b8261b to
8fbcf39Compareblizzz
commented
Feb 22, 2018
MemberAuthor
added. old habits ¯_(ツ)_/¯ |
| try { | ||
| $appPath = $this->getAppPath($appId); | ||
| } catch (AppPathNotFoundException $e) { | ||
| return null; |
There was a problem hiding this comment.
the old OCP has null documented:
Line 76 in 6d3c8d5
There was a problem hiding this comment.
And it's also expected in some places:
server/lib/private/Installer.php
Lines 107 to 113 in 9dc3b04
Member
There was a problem hiding this comment.
Check if not array and immediately use as array. Goood )
MemberAuthor
There was a problem hiding this comment.
Already fixed in https://github.com/nextcloud/server/pull/8504… but could use a backport.
blizzz
commented
Feb 22, 2018
MemberAuthor
😕 thx. so much for a quick fix. looking later at it again. |
rullzer
commented
May 23, 2018
Member
No activity for a long time. I'll close this. Feel free to reopen if somebody picks it up. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
null causes exceptions down the road (e.g. when you uncleanly remove an app only from the file system) in AppManager::getIncompatibleApps()::405, the call to
isAppCompatiblewhich expects the second parameter to be an array. Restores the same behaviour as before. Without this, you are greeted with an unstyled error page.