Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d65e459 authored by Akhil's avatar Akhil 🙂
Browse files

Explicitly cast input values of usage array to integer

parent 3ddd1af8
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -106,6 +106,8 @@ class UserController extends ApiController
            return $response;
        }
        try {
            // Explicitly cast input values to integer
            $usage = array_map(fn ($value) => (int) $value, $usage);
            $this->updateMailQuotaUsageInPreferences($usage);
        } catch (Exception $e) {
            $statusCode = 500;