diff --git a/public-legacy/manage/users/note.php b/public-legacy/manage/users/note.php index f3cfa79..8e422c4 100644 --- a/public-legacy/manage/users/note.php +++ b/public-legacy/manage/users/note.php @@ -42,7 +42,7 @@ if($hasUserId) { if($_SERVER['REQUEST_METHOD'] === 'GET' && filter_has_var(INPUT_GET, 'delete')) { if(CSRF::validateRequest()) { - $modNotes->deleteNote($noteInfo); + $modNotes->deleteNotes($noteInfo); $msz->createAuditLog('MOD_NOTE_DELETE', [$noteInfo->getId(), $noteInfo->getUserId()]); url_redirect('manage-users-notes', ['user' => $noteInfo->getUserId()]); } else render_error(403); diff --git a/src/Users/ModNotes.php b/src/Users/ModNotes.php index c3927ae..69ce7dd 100644 --- a/src/Users/ModNotes.php +++ b/src/Users/ModNotes.php @@ -136,7 +136,7 @@ class ModNotes { return $this->getNote((string)$this->dbConn->getLastInsertId()); } - public function deleteNote(ModNoteInfo|string|array $noteInfos): void { + public function deleteNotes(ModNoteInfo|string|array $noteInfos): void { if(!is_array($noteInfos)) $noteInfos = [$noteInfos]; @@ -150,7 +150,7 @@ class ModNotes { if($noteInfo instanceof ModNoteInfo) $noteInfo = $noteInfo->getId(); elseif(!is_string($noteInfo)) - throw new InvalidArgumentException('$noteInfos must be strings of instances of ModNoteInfo'); + throw new InvalidArgumentException('$noteInfos must be strings of instances of ModNoteInfo.'); $stmt->addParameter(++$args, $noteInfo); }