Assure result is an array before looping it

When doing self tests in admin that will fail, we need to assure that the result is an array before proceeding.