X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/e457063f931911a1e9fc0917767dc07f92d24f02..74704a7d4ecfb939bbcddeeec397b9de3b85bd2f:/mobile/time.php diff --git a/mobile/time.php b/mobile/time.php index 0e787fc6..dda3767c 100644 --- a/mobile/time.php +++ b/mobile/time.php @@ -125,12 +125,13 @@ if (MODE_PROJECTS == $user->tracking_mode || MODE_PROJECTS_AND_TASKS == $user->t // Build a client list out of active clients. Use only clients that are relevant to user. // 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; - } + $projects_assigned_to_client = explode(',', $client['projects']); + 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);', @@ -305,3 +306,4 @@ $smarty->assign('timestring', $selected_date->toString($user->date_format)); $smarty->assign('title', $i18n->getKey('title.time')); $smarty->assign('content_page_name', 'mobile/time.tpl'); $smarty->display('mobile/index.tpl'); +?> \ No newline at end of file