From 9415ca38da512ae7a32150adf0de748442cf3269 Mon Sep 17 00:00:00 2001 From: Olav Morken <olav.morken@uninett.no> Date: Thu, 9 Sep 2010 10:40:55 +0000 Subject: [PATCH] SAML2_HTTPArtifact: Avoid PHP warnings when receiving ArtifactResponse without data. git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2537 44740490-163a-0410-bde0-09ae8108e29a --- lib/SAML2/HTTPArtifact.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/SAML2/HTTPArtifact.php b/lib/SAML2/HTTPArtifact.php index 21646ff64..f049272cc 100644 --- a/lib/SAML2/HTTPArtifact.php +++ b/lib/SAML2/HTTPArtifact.php @@ -117,6 +117,11 @@ class SAML2_HTTPArtifact extends SAML2_Binding { } $xml = $artifactResponse->getAny(); + if ($xml === NULL) { + /* Empty ArtifactResponse - possibly because of Artifact replay? */ + return NULL; + } + $samlresponse = SAML2_Message::fromXML($xml); $samlresponse->addValidator(array(get_class($this), 'validateSignature'), $artifactResponse); -- GitLab