Fix error if $results empty or undefined..

We should defined $results as array, so if the data empty, it will not return an undefined $results variable.