GET and negative number weirdness

I don’t know if this is a general PHP issue or a Yii issue, but my GET string seems to be altered somewhere in the request. I send this path to the controller…

/calendarEntry/ajaxGetEvents/distance/5/lat/38.64699101577188/lon/-90.22496699999999?_=1287758285259&start=1285477200&end=1289106000

but, in my action, if I dump the GET string…




//first line in actionAjaxGetEvents()

CVarDumper::dump($_GET);



…I get the string, but the longitude drops the sign…

array

(

'_' => '1287758285259'


'start' => '1285477200'


'end' => '1289106000'


'distance' => '5'


'lat' => '38.64699101577188'


'lon' => '90.22496699999999'

)

Any ideas as to why this is happening?

I’m an idiot. — to encode it properly.

::)

That actually didn’t do it, and neither did − If I tried to cast the number to double or float, it would convert to a zero value. I ended up having to evaluate the sign of the value in my javascript, prepend ‘NEG’ to the beginning of negative signed numbers in the GET string, then parse it all in my action. Weird stuff… Also, it wasn’t my javascript creating a weird encoding of a minus sign; I typed it in by hand, and it still just dropped the sign. :blink: