Small opcode optimizations

This commit is contained in:
DariusIII
2026-02-24 16:40:26 +01:00
parent 85ea45ad62
commit ec98395cde
29 changed files with 176 additions and 378 deletions
+2 -2
View File
@@ -158,7 +158,7 @@ class ProfileController extends BasePageController
// Update theme preference
if ($request->has('theme_preference')) {
$themeValue = $request->input('theme_preference');
if (in_array($themeValue, ['light', 'dark', 'system'])) {
if (in_array($themeValue, ['light', 'dark', 'system'], true)) {
User::where('id', $userid)->update(['theme_preference' => $themeValue]);
}
}
@@ -167,7 +167,7 @@ class ProfileController extends BasePageController
if ($request->has('timezone')) {
$timezoneValue = $request->input('timezone');
$validTimezones = array_merge(['UTC'], ...array_values(getAvailableTimezones()));
if (in_array($timezoneValue, $validTimezones)) {
if (in_array($timezoneValue, $validTimezones, true)) {
User::where('id', $userid)->update(['timezone' => $timezoneValue]);
}
}