If it is an error, throwing an exception is the right way to report it when using OOP code.

And if the getGlobals() method does not return an array, it means the class does not respect the interface (which asks to return an array), so an exception is fine IMO.