fix Scrutinizer "bugs"

This commit is contained in:
Ralf Becker 2016-06-29 10:38:41 +02:00
parent 82c4eecfa3
commit 4db7e2fb94

View File

@ -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++;
}