Browse Source

check if micropub config returned a response

pull/10/head
Aaron Parecki 8 years ago
parent
commit
87209df1ee
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      lib/helpers.php

+ 1
- 1
lib/helpers.php View File

@ -186,7 +186,7 @@ function get_micropub_config(&$user) {
$r = micropub_get($user->micropub_endpoint, [], $user->access_token);
if(array_key_exists('media-endpoint', $r['data'])) {
if($r['data'] && is_array($r['data']) && array_key_exists('media-endpoint', $r['data'])) {
$user->micropub_media_endpoint = $r['data']['media-endpoint'];
$user->save();
}

Loading…
Cancel
Save