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) {
|
if ($url) {
|
||||||
$indiewebUser = IndieWebUser::where('me', $url)->first();
|
$indiewebUser = IndieWebUser::where('me', $url)->first();
|
||||||
}
|
}
|
||||||
$syndication = $this->parseSyndicationTargets($indiewebUser->syndication);
|
if ($indiewebUser) {
|
||||||
$mediaEndpoint = $indiewebUser->mediaEndpoint ?? null;
|
$syndication = $this->parseSyndicationTargets($indiewebUser->syndication);
|
||||||
$mediaURLs = $request->session()->get('media-links');
|
$mediaEndpoint = $indiewebUser->mediaEndpoint ?? null;
|
||||||
|
$mediaURLs = $request->session()->get('media-links');
|
||||||
|
}
|
||||||
|
|
||||||
return view('micropub.create', compact('url', 'syndication', 'mediaEndpoint', 'mediaURLs'));
|
return view('micropub.create', compact('url', 'syndication', 'mediaEndpoint', 'mediaURLs'));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue