From 11cf639d3f990533a00d8ae8c7d283563ba89244 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jaime=20Pe=CC=81rez=20Crespo?= <jaime.perez@uninett.no>
Date: Thu, 30 Mar 2017 09:33:00 +0200
Subject: [PATCH] The return value from SimpleSAML\Utils\HTTP::fetch() can
 never be false.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

If something fails, an exception would be thrown, instead of “false” being returned.

Also, at this point we are sure that the return value will be a string, because the call to fetch() does not set the third parameter ($getHeaders) to true.
---
 lib/SimpleSAML/Bindings/Shib13/Artifact.php | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/lib/SimpleSAML/Bindings/Shib13/Artifact.php b/lib/SimpleSAML/Bindings/Shib13/Artifact.php
index 5960dceb9..9691dc4eb 100644
--- a/lib/SimpleSAML/Bindings/Shib13/Artifact.php
+++ b/lib/SimpleSAML/Bindings/Shib13/Artifact.php
@@ -179,10 +179,7 @@ class Artifact
 
         // Fetch the artifact
         $response = HTTP::fetch($url, $opts);
-        if ($response === false) {
-            throw new \SimpleSAML_Error_Exception('Failed to retrieve assertion from IdP.');
-        }
-
+        /** @var string $response */
         XML::debugSAMLMessage($response, 'in');
 
         // Find the response in the SOAP message
-- 
GitLab