diff --git a/library/Zend/Http/Cookies.php b/library/Zend/Http/Cookies.php index 012fb5e9d87..f4e2bf2d9eb 100644 --- a/library/Zend/Http/Cookies.php +++ b/library/Zend/Http/Cookies.php @@ -183,10 +183,11 @@ public function getMatchingCookies($uri, $matchSessionCookies = true, // Next, run Cookie->match on all cookies to check secure, time and session matching $ret = array(); - foreach ($cookies as $cookie) - if ($cookie->match($uri, $matchSessionCookies, $now)) + foreach ($cookies as $cookie) { + if ($cookie->match($uri, $matchSessionCookies, $now)) { $ret[] = $cookie; - + } + } // Now, use self::_flattenCookiesArray again - only to convert to the return format ;) $ret = $this->_flattenCookiesArray($ret, $retAs); @@ -218,7 +219,9 @@ public function getCookie($uri, $cookieName, $retAs = self::COOKIE_OBJECT) // Get correct cookie path $path = $uri->getPath(); $path = substr($path, 0, strrpos($path, '/')); - if (! $path) $path = '/'; + if (! $path) { + $path = '/'; + } if (isset($this->cookies[$uri->getHost()][$path][$cookieName])) { $cookie = $this->cookies[$uri->getHost()][$path][$cookieName];