So, I tried to see if this question had been asked before on here, but none of the questions dealt with non-object errors with a bool error. I'll add the line of code that is causing the error, but please let me know if you need more code for further context, and I will edit the post and add it.
I am basically trying to return search results, and I have a conditional if statement telling the browser to return search results if the results return more rows than 0. I return this error, and I am completely unsure as to why, or what is causing it.
    $searchSQL = 'SELECT * FROM images WHERE MATCH (appname, firstname, lastname, image) AGAINST ( "' . 
    $search . '" ) LIMIT ' . $offset . ', 10;';
    $searchResult = $db->query($searchSQL);
    //declade the array variable to store the results
    $output = array();
    if ($searchResult->num_rows > 0)
    {
        while ($row = $result->fetch_assoc() )
        {
            //add row to output array in the form of an associative array 
            $output[] = array ("image" => $row["image"], "firstname" => $row["firstname"], "lastname" => 
            $row["lastname"], "appname" => $row["appname"]);
        }//end while
    }//end if
    $db->close();
 
     
    