diff --git a/api/ui/results.php b/api/ui/results.php index ff7f3f511c..7698ba915c 100644 --- a/api/ui/results.php +++ b/api/ui/results.php @@ -100,12 +100,14 @@ public function get() { if($e == $id) { echo "found in e.\n"; } - foreach ($e as $ok) { - if (gettype($ok) == 'string') { - echo $ok; - } - if($ok == $id) { - echo "found in e.\n"; + if (gettype($e)=='array') { + foreach ($e as $ok) { + if (gettype($ok) == 'string') { + echo $ok; + } + if ($ok == $id) { + echo "found in e.\n"; + } } } }