From 82cbb8c7cb6e0170e8dc923b3f4a8eedb061571c Mon Sep 17 00:00:00 2001 From: ahocevar Date: Mon, 20 Jul 2009 21:11:03 +0000 Subject: [PATCH] fixed getParameterString to handle null/undefined values correctly. r=elemoine (closes #2157) git-svn-id: http://svn.openlayers.org/trunk/openlayers@9573 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Util.js | 6 +++++- tests/Util.html | 7 +++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/OpenLayers/Util.js b/lib/OpenLayers/Util.js index caa0a59e75..96e7e2ab50 100644 --- a/lib/OpenLayers/Util.js +++ b/lib/OpenLayers/Util.js @@ -608,8 +608,12 @@ OpenLayers.Util.getParameterString = function(params) { if (typeof value == 'object' && value.constructor == Array) { /* value is an array; encode items and separate with "," */ var encodedItemArray = []; + var item; for (var itemIndex=0, len=value.length; itemIndex