Added check for malfored URLS instead of resulting in a FATAL ERROR

Had an issue where URIs that are unencoded such as:

/brand?min_last_modified=\'1/1/0001\'&start_element=24800&num_elements=100
/category?start_element=0&num_elements=100&min_last_modified=2013-06-19+12:47:57

were resulting in FATAL error since parse_url was returning false. Resulting in an invalid operand FATAL error with FALSE + defaults.

This patch resolves this issue. Please feel free to modify according to your rigorous standards.