Check if search results were found before looping through them

This is following up from https://github.com/PrestaShop/PrestaShop/pull/2326 , which it turns out didn't actuall resolve the issue. `$search['result']` can be false if nothing was found, and coercing it to an array will still cause warnings when you try to modify `$product['link']` in the line below.