Fix an issue in the parseSyndicationTargets
This commit is contained in:
parent
da61bf5a07
commit
532caabc5e
2 changed files with 7 additions and 2 deletions
|
@ -320,8 +320,10 @@ class MicropubClientController extends Controller
|
|||
}
|
||||
$syndicateTo = [];
|
||||
$data = json_decode($syndicationTargets, true);
|
||||
foreach ($syndicateTo['syndicate-to'] as $syn) {
|
||||
$syndicateTo[] = $syn['uid'];
|
||||
if (array_key_exists('syndicate-to', $data)) {
|
||||
foreach ($data['syndicate-to'] as $syn) {
|
||||
$syndicateTo[] = $syn['uid'];
|
||||
}
|
||||
}
|
||||
if (count($syndicateTo) > 0) {
|
||||
return $syndicateTo;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue