From 6ffca6cfad5582cd7d0b000760dbf1b0c2ffba3f Mon Sep 17 00:00:00 2001 From: Steve Ireland Date: Tue, 11 Apr 2023 08:46:57 -0400 Subject: [PATCH] For #3730. @odeia raised a couple of issues that needed to be fixed. --- app/Controllers/Cashups.php | 4 ++-- app/Controllers/Expenses.php | 2 +- app/Models/Cashup.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Controllers/Cashups.php b/app/Controllers/Cashups.php index 79ffa7bd1..75fa1aaf2 100644 --- a/app/Controllers/Cashups.php +++ b/app/Controllers/Cashups.php @@ -188,10 +188,10 @@ class Cashups extends Secure_Controller public function postSave(int $cashup_id = NEW_ENTRY): void { - $open_date = $this->request->getPost('open_date', FILTER_SANITIZE_FULL_SPECIAL_CHARS); + $open_date = $this->request->getPost('open_date'); $open_date_formatter = date_create_from_format($this->config['dateformat'] . ' ' . $this->config['timeformat'], $open_date); - $close_date = $this->request->getPost('close_date', FILTER_SANITIZE_NUMBER_INT); + $close_date = $this->request->getPost('close_date'); $close_date_formatter = date_create_from_format($this->config['dateformat'] . ' ' . $this->config['timeformat'], $close_date); $cash_up_data = [ diff --git a/app/Controllers/Expenses.php b/app/Controllers/Expenses.php index 6819da6b7..01227d7f2 100644 --- a/app/Controllers/Expenses.php +++ b/app/Controllers/Expenses.php @@ -125,7 +125,7 @@ class Expenses extends Secure_Controller echo view("expenses/form", $data); } - public function getRow(int $row_id): vpid + public function getRow(int $row_id): void { $expense_info = $this->expense->get_info($row_id); $data_row = get_expenses_data_row($expense_info); diff --git a/app/Models/Cashup.php b/app/Models/Cashup.php index 16d9c958a..a7a33afb2 100644 --- a/app/Models/Cashup.php +++ b/app/Models/Cashup.php @@ -201,7 +201,7 @@ class Cashup extends Model } else { - return getEmptyObject('cash_up'); + return $this->getEmptyObject('cash_up'); } }