diff --git a/app/MetadataResolver/PatreonResolver.php b/app/MetadataResolver/PatreonResolver.php index 5ce28e7..7ba3235 100644 --- a/app/MetadataResolver/PatreonResolver.php +++ b/app/MetadataResolver/PatreonResolver.php @@ -28,11 +28,11 @@ class PatreonResolver implements Resolver if ($res->getStatusCode() === 200) { $metadata = $this->ogpResolver->parse($res->getBody()); - parse_str(parse_url($metadata->image, PHP_URL_QUERY), $temp); - $expires_at_unixtime = $temp['token-time']; - $expires_at = Carbon::createFromTimestamp($expires_at_unixtime); - - $metadata->expires_at = $expires_at; + parse_str(parse_url($metadata->image, PHP_URL_QUERY), $query); + if (isset($query['token-time'])) { + $expires_at_unixtime = $query['token-time']; + $metadata->expires_at = Carbon::createFromTimestamp($expires_at_unixtime); + } return $metadata; } else {