From 31da9aad31e4fb4672dd294ea977cc174ca648d5 Mon Sep 17 00:00:00 2001
From: Tim van Dijen <tvdijen@gmail.com>
Date: Thu, 28 Dec 2017 17:00:07 +0100
Subject: [PATCH] Pass options as an array instead of resource

---
 modules/oauth/lib/Consumer.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/oauth/lib/Consumer.php b/modules/oauth/lib/Consumer.php
index 02f649eaf..dbea3586e 100644
--- a/modules/oauth/lib/Consumer.php
+++ b/modules/oauth/lib/Consumer.php
@@ -154,9 +154,9 @@ class sspmod_oauth_Consumer
                 'header' => 'Content-Type: application/x-www-form-urlencoded',
             ),
         );
-        $context = stream_context_create($opts);
+
         try {
-            $response = \SimpleSAML\Utils\HTTP::fetch($url, $context);
+            $response = \SimpleSAML\Utils\HTTP::fetch($url, $opts);
         } catch (\SimpleSAML_Error_Exception $e) {
             throw new SimpleSAML_Error_Exception('Failed to push definition file to ' . $url);
         }
-- 
GitLab