AppInfo: add config checks before using backends#5
Open
spacefreak86 wants to merge 1 commit intorotdrop:production/cafevdb/stable31from
Open
AppInfo: add config checks before using backends#5spacefreak86 wants to merge 1 commit intorotdrop:production/cafevdb/stable31from
spacefreak86 wants to merge 1 commit intorotdrop:production/cafevdb/stable31from
Conversation
Config checks were removed when moving to IBootstrap: f6bcde7 (Move to IBootstrap initialization and remove the deprecated appinfo/app.php, 2025-04-10) Due to the missing checks, the Nextcloud log is flooded with error messages (SQL errors) if the configuration is incomplete. This is also if either only the user or group backend is used.
|
I think this (no config checks before using backends) also prevents the app from working if it is not set up, as the DB queries happen even if there is no set up at all. As a result, you get the following error when you install the app for the first time: I solved it by adding the following as the top of if ( !isset( $this->properties[DB::DRIVER] ) ) {
return false;
}This is obviously hacky, but it fixes it as it prevents the app from attempting to send queries to the database if there is no Database driver set up. I am not a modern PHP coder or a NC code expert, your solution looks better to me @spacefreak86! |
|
This patch here works for us. |
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 free
to 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.
Config checks were removed when moving to IBootstrap:
f6bcde7 (Move to IBootstrap initialization and remove the deprecated appinfo/app.php, 2025-04-10)
Due to the missing checks, the Nextcloud log is flooded with error messages (SQL errors) if the configuration is incomplete. This is also if either only the user or group backend is used.