allen58992008 / touchcode

Automatically exported from code.google.com/p/touchcode
0 stars 0 forks source link

Problem with NSURL_Extensions when parsing a url that contains a query string param with no value #38

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. try to get the query dictionary for a url like:
http://maps.google.com/?q=Detroit+DTW+United+States&zoom

What is the expected output? What do you see instead?
The expected output is a dict of key/value pairs. Instead a array index
exception is thrown

Please provide any additional information below.

I solved it with the following change
NSString *theValue = [theKeyValuePairArray count] > 1 ?
[theKeyValuePairArray objectAtIndex:1] : @"";

Original issue reported on code.google.com by edwrenb...@gmail.com on 13 Nov 2008 at 4:48

GoogleCodeExporter commented 8 years ago

Original comment by jwight on 1 Nov 2010 at 7:31