X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/6bf4de0f31dae411c28ce677b6982a17d7892795..a502ade9090a8ef1490c9e015ae0a39579e92387:/lib/MLIB/HTML/Link.php?ds=inline diff --git a/lib/MLIB/HTML/Link.php b/lib/MLIB/HTML/Link.php index a799b20..511b387 100644 --- a/lib/MLIB/HTML/Link.php +++ b/lib/MLIB/HTML/Link.php @@ -257,21 +257,24 @@ If they doesn't exists, they are added, if they exists, they are updated. function getQueryString() { $vars = array(); - foreach ($this->_getVars as $var => $v) { - if (is_object($v) and method_exists($v, 'tostring')) { - $v = $v->tostring(); - } elseif (is_object($v)) { - $v = serialize($v); - } - if (is_array($v)) { - foreach ($v as $i) { - $vars[] = urlencode($var) . '[]=' . urlencode($i); + if ($this->_getVars) + { + foreach ($this->_getVars as $var => $v) { + if (is_object($v) and method_exists($v, 'tostring')) { + $v = $v->tostring(); + } elseif (is_object($v)) { + $v = serialize($v); + } + if (is_array($v)) { + foreach ($v as $i) { + $vars[] = urlencode($var) . '[]=' . urlencode($i); + } + } else { + $vars[] = urlencode($var) . '=' . urlencode($v); } - } else { - $vars[] = urlencode($var) . '=' . urlencode($v); } + return join('&', $vars); } - return join('&', $vars); } /**