# HG changeset patch # User Nathan Phillip Brink # Date 2012-10-15 08:46:52 # Node ID a24bc42b43e56345ba9622834add984a4808113b # Parent 33415a1408d13cca152b45f0a7b0498a251baa07 Fix autocomplete of departments for schools which do not crawl human-friendly department names, such as cedarville. diff --git a/auto.php b/auto.php --- a/auto.php +++ b/auto.php @@ -134,7 +134,7 @@ if (!$getsections && count($term_parts) if (count($json_depts) == 1) { $dept = $json_depts[0]; - if (!empty($dept['value'])) + if (is_array($dept) && !empty($dept['value'])) $dept = $dept['value']; page::redirect('auto.php' . page::query_string(array('term' => $dept . '-') + $_GET));