Fix last reference of replaced variable $owner_nick in Protocol\Feed::atom()

- Address https://github.com/friendica/friendica/issues/11994#issuecomment-1336146405
This commit is contained in:
Hypolite Petovan 2022-12-03 07:27:30 -05:00
parent 82972744a9
commit 303d556ab0

View file

@ -943,7 +943,7 @@ class Feed
if ((time() - strtotime($owner['last-item'])) < 15*60) { if ((time() - strtotime($owner['last-item'])) < 15*60) {
$result = DI::cache()->get($cachekey); $result = DI::cache()->get($cachekey);
if (!$nocache && !is_null($result)) { if (!$nocache && !is_null($result)) {
Logger::info('Cached feed duration', ['seconds' => number_format(microtime(true) - $stamp, 3), 'nick' => $owner_nick, 'filter' => $filter, 'created' => $previous_created]); Logger::info('Cached feed duration', ['seconds' => number_format(microtime(true) - $stamp, 3), 'nick' => $owner['nickname'], 'filter' => $filter, 'created' => $previous_created]);
return $result['feed']; return $result['feed'];
} }
} }
@ -997,7 +997,7 @@ class Feed
$msg = ['feed' => $feeddata, 'last_update' => $last_update]; $msg = ['feed' => $feeddata, 'last_update' => $last_update];
DI::cache()->set($cachekey, $msg, Duration::QUARTER_HOUR); DI::cache()->set($cachekey, $msg, Duration::QUARTER_HOUR);
Logger::info('Feed duration', ['seconds' => number_format(microtime(true) - $stamp, 3), 'nick' => $owner_nick, 'filter' => $filter, 'created' => $previous_created]); Logger::info('Feed duration', ['seconds' => number_format(microtime(true) - $stamp, 3), 'nick' => $owner['nickname'], 'filter' => $filter, 'created' => $previous_created]);
return $feeddata; return $feeddata;
} }