]> git.mxchange.org Git - friendica.git/commitdiff
Prioritize coalescing parameters in Moderation\Users\*->processGetActions
authorHypolite Petovan <hypolite@mrpetovan.com>
Fri, 31 Jan 2025 17:11:59 +0000 (12:11 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Fri, 31 Jan 2025 17:11:59 +0000 (12:11 -0500)
↪ This was causing missing array index warnings when the casting took precedence

src/Module/Moderation/Users/Active.php
src/Module/Moderation/Users/Blocked.php
src/Module/Moderation/Users/Index.php

index 1b11685f6410933b0b28a273cedcdf9233422933..a91f5934dc32f6cc3b5dca1939999f917d963174 100644 (file)
@@ -124,8 +124,8 @@ class Active extends BaseUsers
         */
        private function processGetActions(): void
        {
-               $action = (string)$this->parameters['action'] ?? '';
-               $uid = (int)$this->parameters['uid'] ?? 0;
+               $action = (string) ($this->parameters['action'] ?? '');
+               $uid = (int) ($this->parameters['uid'] ?? 0);
 
                if ($uid === 0) {
                        return;
index fbdbc8d8c7e338cb3f35d1b0458f79330a7854d7..3c2577f7f07b4d6f19b4add8c3fce3a48f5a4ff6 100644 (file)
@@ -123,8 +123,8 @@ class Blocked extends BaseUsers
         */
        private function processGetActions(): void
        {
-               $action = (string)$this->parameters['action'] ?? '';
-               $uid = (int)$this->parameters['uid'] ?? 0;
+               $action = (string) ($this->parameters['action'] ?? '');
+               $uid = (int) ($this->parameters['uid'] ?? 0);
 
                if ($uid === 0) {
                        return;
index 7d195c109622b599151b4adf9e661cfffe17492b..26d71efd60d2bda07c04bdfb5507e9c095deb834 100644 (file)
@@ -135,8 +135,8 @@ class Index extends BaseUsers
         */
        private function processGetActions(): void
        {
-               $action = (string) $this->parameters['action'] ?? '';
-               $uid = (int) $this->parameters['uid'] ?? 0;
+               $action = (string) ($this->parameters['action'] ?? '');
+               $uid = (int) ($this->parameters['uid'] ?? 0);
 
                if ($uid === 0) {
                        return;