Skip to content

Commit

Permalink
more errors
Browse files Browse the repository at this point in the history
where did this come from?
  • Loading branch information
lachlan-00 committed May 13, 2024
1 parent 1c6ea41 commit 66f3dff
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/Module/Application/ApplicationRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ public function run(
array $action_list,
string $default_action
): void {
$action_name = htmlspecialchars($request->getParsedBody()['action'] ?? $request->getQueryParams()['action'] ?? '');
$body = (array)$request->getParsedBody();
$action_name = htmlspecialchars($body['action'] ?? $request->getQueryParams()['action'] ?? '');

if (array_key_exists($action_name, $action_list) === false) {
$action_name = $default_action;
Expand Down
3 changes: 2 additions & 1 deletion src/Module/Application/Label/ConfirmDeleteAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ public function run(ServerRequestInterface $request, GuiGatekeeperInterface $gat
return null;
}

$labelId = (int) ($request->getParsedBody()['label_id'] ?? 0);
$body = (array)$request->getParsedBody();
$labelId = (int)($body['label_id'] ?? 0);

$label = $this->labelRepository->findById($labelId);
if (
Expand Down
2 changes: 1 addition & 1 deletion src/Module/Application/Shout/AddShoutAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function run(ServerRequestInterface $request, GuiGatekeeperInterface $gat
throw new AccessDeniedException();
}

$body = (array) $request->getParsedBody();
$body = (array)$request->getParsedBody();
$objectType = $body['object_type'] ?? '';
$objectId = (int) ($body['object_id'] ?? 0);
$text = $body['comment'] ?? '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ public function run(ServerRequestInterface $request, GuiGatekeeperInterface $gat
(int) ($request->getQueryParams()['playlist_id'] ?? 0)
);

$data = (array)$request->getParsedBody();
if ($playlist->has_access()) {
$playlist->set_rules($request->getParsedBody());
$playlist->set_rules($data);
$playlist->update();
$playlist->format();
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/Module/Util/Mailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ public function send($phpmailer = null): bool
if ($retval === true) {
return true;
} else {
debug_event(self::class, 'Did not send mail. ErrorInfo: ' . ($mail['ErrorInfo'] ?? ''), 5);
debug_event(self::class, 'Did not send mail. ErrorInfo: ' . ($mail->ErrorInfo ?? ''), 5);

return false;
}
Expand Down

0 comments on commit 66f3dff

Please sign in to comment.