From 4db7e2fb945f4a88520755c48446512cfc638f10 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 29 Jun 2016 10:38:41 +0200 Subject: [PATCH] fix Scrutinizer "bugs" --- timesheet/inc/class.timesheet_ui.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/timesheet/inc/class.timesheet_ui.inc.php b/timesheet/inc/class.timesheet_ui.inc.php index e3509ede8c..c7a3d34cd0 100644 --- a/timesheet/inc/class.timesheet_ui.inc.php +++ b/timesheet/inc/class.timesheet_ui.inc.php @@ -1133,9 +1133,9 @@ class timesheet_ui extends timesheet_bo $cat_name = Api\Categories::id2name($settings); $action_msg = lang('changed category to %1', $cat_name); foreach((array)$checked as $n => $id) { - $entry = $this->read($id); - $entry['cat_id'] = $settings; - if($this->save($entry) == 0) + if (($entry = $this->read($id)) && + ($entry['cat_id'] = $settings) && + $this->save($entry) == 0) { $success++; }