Prioritize coalescing parameters in Moderation\Users\*->processGetActions

↪ This was causing missing array index warnings when the casting took precedence
This commit is contained in:
Hypolite Petovan 2025-01-31 12:11:59 -05:00
parent f1dfa63764
commit e6f4df3442
3 changed files with 6 additions and 6 deletions

View file

@ -124,8 +124,8 @@ class Active extends BaseUsers
*/ */
private function processGetActions(): void private function processGetActions(): void
{ {
$action = (string)$this->parameters['action'] ?? ''; $action = (string) ($this->parameters['action'] ?? '');
$uid = (int)$this->parameters['uid'] ?? 0; $uid = (int) ($this->parameters['uid'] ?? 0);
if ($uid === 0) { if ($uid === 0) {
return; return;

View file

@ -123,8 +123,8 @@ class Blocked extends BaseUsers
*/ */
private function processGetActions(): void private function processGetActions(): void
{ {
$action = (string)$this->parameters['action'] ?? ''; $action = (string) ($this->parameters['action'] ?? '');
$uid = (int)$this->parameters['uid'] ?? 0; $uid = (int) ($this->parameters['uid'] ?? 0);
if ($uid === 0) { if ($uid === 0) {
return; return;

View file

@ -135,8 +135,8 @@ class Index extends BaseUsers
*/ */
private function processGetActions(): void private function processGetActions(): void
{ {
$action = (string) $this->parameters['action'] ?? ''; $action = (string) ($this->parameters['action'] ?? '');
$uid = (int) $this->parameters['uid'] ?? 0; $uid = (int) ($this->parameters['uid'] ?? 0);
if ($uid === 0) { if ($uid === 0) {
return; return;