Modified the Server::getMessages() API to make it always return an array, instead of returning false when there are no messages.
Made Server::getMessages() api more consistent by making it allways r…
…eturn an array.
Instead of removing those lines we should just return an empty array directly, rather than continuing those other calls against nothing.
I can do it. I just took the simpler option. It added close to no overhead, since it just got something already calculated, initializated an array, and then skipped the loop, but I'll change it to return an array.
@tedivm I had forgotten about this PR. I've updated the branch in order to make it mergeable.
Added a check to avoid un-necessary calls.
I'm closing this out, as the functionality got pulled in through another PR. Thank you for the contribution though, it's always appreciated!