When $url is not an array it must be checked before
When $url is not an array it must be checked before

This causes invalid offset errors in PHP 5.4:

- Closes GH-181
- Closes GH-225
- Closes #462

cvo-technologies/croogo,Wouter0100/croogo,rakeshtembhurne/croogo,rakeshtembhurne/croogo,xintesa/croogo,delkyd/croogo,damien-biasotto/croogo,rchavik/croogo,delkyd/croogo,cvo-technologies/croogo,cvo-technologies/croogo,xintesa/croogo,Wouter0100/croogo,delkyd/croogo,rakeshtembhurne/croogo,Wouter0100/croogo,damien-biasotto/croogo,rchavik/croogo,xintesa/croogo