Check for existence of indiewebUser variable
This commit is contained in:
parent
a6999c9609
commit
831d686c64
1 changed files with 5 additions and 3 deletions
|
@ -33,9 +33,11 @@ class MicropubClientController extends Controller
|
|||
if ($url) {
|
||||
$indiewebUser = IndieWebUser::where('me', $url)->first();
|
||||
}
|
||||
$syndication = $this->parseSyndicationTargets($indiewebUser->syndication);
|
||||
$mediaEndpoint = $indiewebUser->mediaEndpoint ?? null;
|
||||
$mediaURLs = $request->session()->get('media-links');
|
||||
if ($indiewebUser) {
|
||||
$syndication = $this->parseSyndicationTargets($indiewebUser->syndication);
|
||||
$mediaEndpoint = $indiewebUser->mediaEndpoint ?? null;
|
||||
$mediaURLs = $request->session()->get('media-links');
|
||||
}
|
||||
|
||||
return view('micropub.create', compact('url', 'syndication', 'mediaEndpoint', 'mediaURLs'));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue