From: Reedy Date: Wed, 8 Aug 2012 20:09:32 +0000 (+0100) Subject: PHP Warning: Invalid argument supplied for foreach() in /www/w/includes/Uri.php... X-Git-Tag: 1.31.0-rc.0~22794 X-Git-Url: http://git.cyclocoop.org//%27%40script%40/%27?a=commitdiff_plain;h=7ab9b5ee8852ecc8255040034bc1e70c1ee13cfd;p=lhc%2Fweb%2Fwiklou.git PHP Warning: Invalid argument supplied for foreach() in /www/w/includes/Uri.php on line 261 Change-Id: I05e34c4f0f9f31165b29b7ea1fda4417d6c96508 --- diff --git a/includes/Uri.php b/includes/Uri.php index 0816e765bb..93540689b4 100644 --- a/includes/Uri.php +++ b/includes/Uri.php @@ -258,8 +258,10 @@ class Uri { } $query = $this->getQuery(); - foreach( $parameters as $key => $value ) { - $query[$key] = $value; + if ( count( $parameters ) ) { + foreach( $parameters as $key => $value ) { + $query[$key] = $value; + } } $this->setQuery( $query );