PHP 8.2.3011.11.0
Attempt to read property "archive_links" on null
public function location(string $uuid = "1")
{
$location = $this->location->getLocation($uuid);
$sources = $this->source->getActive();
$name = "NO LOCATION FOUND";
$member = Auth::user();
$edit = false;
if ($location) {
$name = $location->name;
}
if (isset($member->role)) {
($member->role == 0 || $member->role == 1) ? $edit = true : $edit = false;
}
$links = explode(',', $location->archive_links);
$comments = explode('+', $location->public_comments);
return view('front.location', [
'title' => str_replace(".", " ", $name),
'location' => $location,
'comments' => $comments,
'actions' => $location->block_count + $location->silence_count,
'sources_count' => count($sources),
'images' => json_decode($location->images),
'links' => $links,
'updated' => $location->updated_at->format('Y M d'),
'edit' => $edit
]);
}
App
Request
https://tweaking.thebad.space/location/c690ca26-cadc-4112-b6a2-da39390274a2
GET
curl "https://tweaking.thebad.space/location/c690ca26-cadc-4112-b6a2-da39390274a2" \
-X GET \
-H 'priority: u=0, i' \
-H 'accept-encoding: gzip, deflate, br, zstd' \
-H 'sec-fetch-dest: document' \
-H 'sec-fetch-user: ?1' \
-H 'sec-fetch-mode: navigate' \
-H 'sec-fetch-site: none' \
-H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7' \
-H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36' \
-H 'upgrade-insecure-requests: 1' \
-H 'accept-language: en-US,en;q=0.9' \
-H 'sec-ch-ua-platform: "Windows"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="126", "Google Chrome";v="126"' \
-H 'host: tweaking.thebad.space';
Browser
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36Headers
- priority
u=0, i- accept-encoding
gzip, deflate, br, zstd- sec-fetch-dest
document- sec-fetch-user
?1- sec-fetch-mode
navigate- sec-fetch-site
none- accept
text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7- user-agent
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36- upgrade-insecure-requests
1- accept-language
en-US,en;q=0.9- sec-ch-ua-platform
"Windows"- sec-ch-ua-mobile
?0- sec-ch-ua
" Not A;Brand";v="99", "Chromium";v="126", "Google Chrome";v="126"- host
tweaking.thebad.space
Context
9:27:10 AM
34.14ms
pgsql
select * from "source" where "active" = true
9:27:10 AM
5.59ms
pgsql
select * from "location" where "uuid" = c690ca26-cadc-4112-b6a2-da39390274a2 and "location"."deleted_at" is null limit 1
9:27:10 AM
9.3ms
pgsql
select * from "source" where "active" = true