I am seeing the PHP notice error;
Notice: Object of class WP_Query could not be converted to int in G:\.....\property-search-form.php on line 350
At that line I have a meta query that create a new WP_Query set of results using the code;
$results = new WP_Query( $args );
if(($results == 0) || ($results == false) || ($results == NULL) || !is_object($results) || !($results->have_posts())) {
return $results;
}
else {
return $results;
}
I understand that the final $result is a number, when I ran it with 9 matching results and used print_r to display the results it returns 9, so not sure what this error means, and how to resolve it.