X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/098a79f0819ebb89b7d48df4a6b154af4560f68e..bdc4cdb7f5efbd4b273be6def7652e9011b977a6:/time.php diff --git a/time.php b/time.php index a6151124..f290e55b 100644 --- a/time.php +++ b/time.php @@ -69,7 +69,7 @@ $cl_finish = trim($request->getParameter('finish')); $cl_duration = trim($request->getParameter('duration')); $cl_note = trim($request->getParameter('note')); // Custom field. -$cl_cf_1 = trim($request->getParameter(('cf_1'), ($request->getMethod()=='POST'? null : @$_SESSION['cf_1']))); +$cl_cf_1 = trim($request->getParameter('cf_1', ($request->getMethod()=='POST'? null : @$_SESSION['cf_1']))); $_SESSION['cf_1'] = $cl_cf_1; $cl_billable = 1; if (in_array('iv', explode(',', $user->plugins))) { @@ -145,11 +145,12 @@ if (MODE_PROJECTS == $user->tracking_mode || MODE_PROJECTS_AND_TASKS == $user->t // Also trim their associated project list to only assigned projects (to user). foreach($active_clients as $client) { $projects_assigned_to_client = explode(',', $client['projects']); - $intersection = array_intersect($projects_assigned_to_client, $projects_assigned_to_user); - if ($intersection) { - $client['projects'] = implode(',', $intersection); - $client_list[] = $client; - } + if (is_array($projects_assigned_to_client) && is_array($projects_assigned_to_user)) + $intersection = array_intersect($projects_assigned_to_client, $projects_assigned_to_user); + if ($intersection) { + $client['projects'] = implode(',', $intersection); + $client_list[] = $client; + } } $form->addInput(array('type'=>'combobox', 'onchange'=>'fillProjectDropdown(this.value);', @@ -371,4 +372,3 @@ $smarty->assign('timestring', $selected_date->toString($user->date_format)); $smarty->assign('title', $i18n->getKey('title.time')); $smarty->assign('content_page_name', 'time.tpl'); $smarty->display('index.tpl'); -?> \ No newline at end of file