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
Make enable_avatars setting more robust #21953
Conversation
* handles the setting in the same way everywhere * fixes #21949
By analyzing the blame information on this pull request, we identified @rullzer, @DeepDiver1975 and @LukasReschke to be potential reviewers |
please backport. 👍 |
I don't think this is needed. |
Be more precise please. Set it to:
This change unified the overall behavior to: |
We have this 'issue' with multiple config settings. |
That's because we have no proper options validation/casting and unified defaults management. |
Well we could do casting based on the provided default value... Anyway this is at least nothign we should backport, because it is a behaviour change |
-.- Really? This could break everything. |
Well with null being an exception, but everytime we set a default its of the type we want to have, anyway your patch here is changing behaviour as well, because '1' previously was enabled, and now it's disabled... |
Not really. Because it was enabled in some code paths and disabled in other code paths, which actually cause the issue this is fixing. The issue was, that it tried to load avatars(setting was evaluated to true) even if the markup to put them in is not present (setting was evaluated to false). This only aligns all usages of the setting to evaluate in the same way. |
TBH: the real issue is that the value in the config file was simply wrong - which was caused by the occ command. |
I would nevertheless make all checks be proof against this. Either all check for true or all use the plain |
We can also check the type of all known values and display warnings on the admin page 🙊 |
Seriously - let's just assume users editing the config file are capable to read. As said above: the original issue was raised because of the config command was not capable to set the boolean value properly |
Could we get back to topic and simply review this change. Even if it is stupid - it doesn't hurt to merge it and it fixes a problem that exists in the real world. The actual problem here is that PHP is dynamically typed and we as developers failed to use a value in the same way everywhere. So this is a pragmatic approach to fix it and it doesn't make anything more complex. |
👍 |
1 similar comment
👍 |
Make enable_avatars setting more robust
backport is in #22047 |
@nickvergessen @rullzer @LukasReschke @Pookay Please review
@karlitschek We maybe want to backport this ;)