From 66c34f012d6ebdfc5432e10fb7f346df205b40c7 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 29 Jun 2016 10:41:59 +0200 Subject: [PATCH] fix Scrutinizer "bugs" --- timesheet/inc/class.timesheet_egw_record.inc.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/timesheet/inc/class.timesheet_egw_record.inc.php b/timesheet/inc/class.timesheet_egw_record.inc.php index 4def600c22..e27a5528c0 100644 --- a/timesheet/inc/class.timesheet_egw_record.inc.php +++ b/timesheet/inc/class.timesheet_egw_record.inc.php @@ -44,10 +44,13 @@ class timesheet_egw_record implements importexport_iface_egw_record public function __construct( $_identifier='' ){ $this->identifier = $_identifier; $this->botimesheet = new timesheet_bo(); - $data = $this->botimesheet->read($this->identifier); - // set ts_project from ts_project_blur, where it get moved, if it is no custom value - if (empty($data['ts_project'])) $data['ts_project'] = $data['ts_project_blur']; - $this->set_record($data); + + if (($data = $this->botimesheet->read($this->identifier))) + { + // set ts_project from ts_project_blur, where it get moved, if it is no custom value + if (empty($data['ts_project'])) $data['ts_project'] = $data['ts_project_blur']; + $this->set_record($data); + } } /**