From f8d42374860009922ee68bd9aba63e50f66e77df Mon Sep 17 00:00:00 2001
From: David Siegfried <david.siegfried@uni-vechta.de>
Date: Mon, 6 May 2024 08:48:05 +0000
Subject: [PATCH] prevent php-warnings, re #4114

Merge request studip/studip!2958
---
 app/controllers/oer/endpoints.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/controllers/oer/endpoints.php b/app/controllers/oer/endpoints.php
index 417f1e8173f..31563f531c0 100644
--- a/app/controllers/oer/endpoints.php
+++ b/app/controllers/oer/endpoints.php
@@ -45,7 +45,7 @@ class Oer_EndpointsController extends StudipController
         $this->render_json([
             'name' => Config::get()->UNI_NAME_CLEAN,
             'public_key' => $host['public_key'],
-            'url' => $GLOBALS['OER_PREFERRED_URI'] ?: $GLOBALS['ABSOLUTE_URI_STUDIP']."dispatch.php/oer/endpoints/",
+            'url' => ($GLOBALS['OER_PREFERRED_URI'] ?? $GLOBALS['ABSOLUTE_URI_STUDIP']) . 'dispatch.php/oer/endpoints/',
             'index_server' => $host['index_server']
         ]);
     }
@@ -254,7 +254,7 @@ class Oer_EndpointsController extends StudipController
                     'description' => $material['description'],
                     'content_type' => $material['content_type'],
                     'front_image_content_type' => $material['front_image_content_type'],
-                    'url' => ($GLOBALS['OER_PREFERRED_URI'] ?: $GLOBALS['ABSOLUTE_URI_STUDIP'])."dispatch.php/oer/market/download/".$item_id,
+                    'url' => ($GLOBALS['OER_PREFERRED_URI'] ?? $GLOBALS['ABSOLUTE_URI_STUDIP']) . 'dispatch.php/oer/market/download/' . $item_id,
                     'player_url' => $material['player_url'],
                     'tool' => $material['tool'],
                     'structure' => ($material['structure'] ? $material['structure']->getArrayCopy() : null),
-- 
GitLab