From: Vincent Zanotti Date: Thu, 30 Jul 2009 18:00:54 +0000 (+0200) Subject: Fixes the OpenID response when there is no header to display. X-Git-Tag: xorg/0.10.2~33^2~18 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=ddb3df45a9aef3a74265d462101a63abde6fa62d;p=platal.git Fixes the OpenID response when there is no header to display. Signed-off-by: Vincent Zanotti --- diff --git a/modules/openid/openid.inc.php b/modules/openid/openid.inc.php index 455e9df..ba70f2f 100644 --- a/modules/openid/openid.inc.php +++ b/modules/openid/openid.inc.php @@ -203,8 +203,10 @@ class OpenId header(sprintf('%s %d', $_SERVER['SERVER_PROTOCOL'], $web_response->code), true, $web_response->code); - foreach ($web_response->headers as $key => $value) { - header(sprintf('%s: %s', $key, $value)); + if (count($web_response->headers) > 0) { + foreach ($web_response->headers as $key => $value) { + header(sprintf('%s: %s', $key, $value)); + } } header('Connection: close');