Skip to content

Commit 222bd9a

Browse files
committed
Fix references to constants
1 parent ae28e29 commit 222bd9a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Controllers/Server/Create.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ protected function handlePost(): void
5656
$this->model->server->setDisabled((bool) ($this->model->form_fields['disabled'] ?? null));
5757
$this->model->server->setOnline((bool) ($this->model->form_fields['online'] ?? null));
5858

59-
$this->model->error = $this->model->server->commit() ? FormModel::ERROR_SUCCESS : FormModel::ERROR_INTERNAL;
59+
$this->model->error = $this->model->server->commit() ? false : FormModel::ERROR_INTERNAL;
6060

61-
if ($this->model->error === FormModel::ERROR_SUCCESS)
61+
if ($this->model->error === false)
6262
{
6363
$event = Logger::initEvent(
6464
\BNETDocs\Libraries\EventLog\EventTypes::SERVER_CREATED,

src/Controllers/User/Delete.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function invoke(?array $args): bool
5858
if (!$this->model->deleted)
5959
{
6060
$this->model->_responseCode = HttpCode::HTTP_INTERNAL_SERVER_ERROR;
61-
$this->model->error = DeleteModel::ERROR_INTERNAL_ERROR;
61+
$this->model->error = DeleteModel::ERROR_INTERNAL;
6262
return true;
6363
}
6464
else

0 commit comments

Comments
 (0)