Fix reference to undefined variable, simplifying code whilst we’re at it

This commit is contained in:
Jonny Barnes 2017-07-12 18:56:36 +01:00
parent 941362e570
commit ffc87a3b32

View file

@ -269,8 +269,7 @@ class Note extends Model
return; return;
} }
$arr = explode('/', $url); $tweetId = basename($this->in_reply_to);
$tweetId = end($arr);
if (Cache::has($tweetId)) { if (Cache::has($tweetId)) {
return Cache::get($tweetId); return Cache::get($tweetId);
} }