Commit 92441b2b640373c823d3ab43996b0ad7de3791a1
1 parent
5c6ebeae
KTS-673
"The search algorithm needs some work" Updated. Committed By: Conrad Vermeulen Reviewed By: Kevin Fourie git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@7226 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
4 additions
and
0 deletions
search2/search/search.inc.php
| @@ -188,6 +188,10 @@ class SearchHelper | @@ -188,6 +188,10 @@ class SearchHelper | ||
| 188 | $fieldset_str .= "\n\t\t{id:\"$fid\", name:\"$name\", description:\"$desc\", datatype:\"$datatype\", control:\"$control\", options: ["; | 188 | $fieldset_str .= "\n\t\t{id:\"$fid\", name:\"$name\", description:\"$desc\", datatype:\"$datatype\", control:\"$control\", options: ["; |
| 189 | $options = $field['options']; | 189 | $options = $field['options']; |
| 190 | $oo = 0; | 190 | $oo = 0; |
| 191 | + if (!is_array($options)) | ||
| 192 | + { | ||
| 193 | + $options = array(); | ||
| 194 | + } | ||
| 191 | foreach($options as $option) | 195 | foreach($options as $option) |
| 192 | { | 196 | { |
| 193 | if ($oo++ > 0) $fieldset_str .= ','; | 197 | if ($oo++ > 0) $fieldset_str .= ','; |