From c20978de1363bf9fbada4afa93319f76680090aa Mon Sep 17 00:00:00 2001 From: Jan-Hendrik Willms <tleilax+studip@gmail.com> Date: Fri, 29 Nov 2024 08:06:06 +0000 Subject: [PATCH] fix deprecated warning, fixxes #4926 Merge request studip/studip!3697 --- lib/models/OpenGraphURL.php | 2 +- lib/plugins/engine/PluginRepository.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/models/OpenGraphURL.php b/lib/models/OpenGraphURL.php index 29e5718ff0d..3caf3c4d255 100644 --- a/lib/models/OpenGraphURL.php +++ b/lib/models/OpenGraphURL.php @@ -170,7 +170,7 @@ class OpenGraphURL extends SimpleORMap } $context = get_default_http_stream_context($this['url']); - stream_context_set_option($context, [ + stream_context_set_options($context, [ 'http' => [ 'method' => 'GET', 'header' => sprintf("User-Agent: Stud.IP v%s OpenGraph Parser\r\n", $GLOBALS['SOFTWARE_VERSION']), diff --git a/lib/plugins/engine/PluginRepository.php b/lib/plugins/engine/PluginRepository.php index 4bd24c6dfe1..303501b4d5e 100644 --- a/lib/plugins/engine/PluginRepository.php +++ b/lib/plugins/engine/PluginRepository.php @@ -63,7 +63,7 @@ class PluginRepository // Set small timeout for the rare case that the repository is not // available $context = get_default_http_stream_context($url); - stream_context_set_option($context, ['http' => [ + stream_context_set_options($context, ['http' => [ 'timeout' => 5, ]]); $metadata = @file_get_contents($url, false, $context); -- GitLab