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

[stable29] fix(config): Throw PreconditionException always when it didn't match #47941

Merged
merged 1 commit into from
Sep 16, 2024

Conversation

backportbot[bot]
Copy link

@backportbot backportbot bot commented Sep 13, 2024

Backport of PR #47933

Previously even when the precondition did not match, the call "passed"
when the after value was the expected one. This however can lead to
race conditions, duplicate code excutions and other things.

Signed-off-by: Joas Schilling <coding@schilljs.com>
@backportbot backportbot bot added bug 3. to review Waiting for reviews labels Sep 13, 2024
@backportbot backportbot bot added this to the Nextcloud 29.0.7 milestone Sep 13, 2024
if ($prevValue === (string)$value) {
return;
} elseif ($preCondition !== null && $prevValue !== (string)$preCondition) {
if ($preCondition !== null && $prevValue !== (string)$preCondition) {

Check notice

Code scanning / Psalm

RedundantCastGivenDocblockType Note

Redundant cast to string given docblock-provided type
@nickvergessen nickvergessen merged commit 6e576e1 into stable29 Sep 16, 2024
174 of 177 checks passed
@nickvergessen nickvergessen deleted the backport/47933/stable29 branch September 16, 2024 07:11
@Altahrim Altahrim mentioned this pull request Oct 1, 2024
1 task
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.

3 participants