]> BookStack Code Mirror - bookstack/blobdiff - app/Users/Controllers/UserApiController.php
PHP: Addressed 8.4 deprecations within app itself
[bookstack] / app / Users / Controllers / UserApiController.php
index c84f1531d6a3853b417c455d0bd743564ea4c7e9..bb2570b3108bfe34131850465067b2f51fc7842c 100644 (file)
@@ -33,7 +33,7 @@ class UserApiController extends ApiController
         });
     }
 
-    protected function rules(int $userId = null): array
+    protected function rules(?int $userId = null): array
     {
         return [
             'create' => [
@@ -54,7 +54,7 @@ class UserApiController extends ApiController
                     'string',
                     'email',
                     'min:2',
-                    (new Unique('users', 'email'))->ignore($userId ?? null),
+                    (new Unique('users', 'email'))->ignore($userId),
                 ],
                 'external_auth_id' => ['string'],
                 'language'         => ['string', 'max:15', 'alpha_dash'],