aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Fuhse <fuhse@data-quest.de>2022-03-24 08:33:36 +0100
committerElmar Ludwig <elmar.ludwig@uni-osnabrueck.de>2022-04-01 12:50:13 +0200
commit526bdd171592b46cc56fe00b658a73710b99151d (patch)
treefbd2b5e85c969141a80ded2c011ce729cc05ced2
parent119d96823ca015587e3ab42653d21d6c3ce8cdab (diff)
re #793
-rwxr-xr-xapp/controllers/oer/endpoints.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/oer/endpoints.php b/app/controllers/oer/endpoints.php
index 6fd8e1a..1c94119 100755
--- a/app/controllers/oer/endpoints.php
+++ b/app/controllers/oer/endpoints.php
@@ -89,14 +89,14 @@ class Oer_EndpointsController extends StudipController
protected function refreshHost($url)
{
+ $host = OERHost::findOneByUrl($url);
+ if (!$host) {
+ return;
+ }
$host_data = file_get_contents($url."fetch_public_host_key");
if ($host_data) {
$host_data = json_decode($host_data, true);
if ($host_data) {
- $host = OERHost::findOneByUrl($url);
- if (!$host) {
- $host = new OERHost();
- }
$host['name'] = $host_data['name'];
$host['url'] = Request::get("from");
$host['public_key'] = $host_data['public_key'];