Merge pull request #12747 from MrPetovan/bug/warnings
Address a couple of warnings
This commit is contained in:
commit
df021b07e3
|
@ -285,8 +285,7 @@ class Status extends BaseFactory
|
||||||
{
|
{
|
||||||
if (empty($item['quote-uri-id'])) {
|
if (empty($item['quote-uri-id'])) {
|
||||||
$media = Post\Media::getByURIId($item['uri-id'], [Post\Media::ACTIVITY]);
|
$media = Post\Media::getByURIId($item['uri-id'], [Post\Media::ACTIVITY]);
|
||||||
if (!empty($media)) {
|
if (!empty($media) && $shared_item = Post::selectFirst(['uri-id'], ['plink' => $media[0]['url'], 'uid' => [$uid, 0]])) {
|
||||||
$shared_item = Post::selectFirst(['uri-id'], ['plink' => $media[0]['url'], 'uid' => [$uid, 0]]);
|
|
||||||
$quote_id = $shared_item['uri-id'];
|
$quote_id = $shared_item['uri-id'];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -351,7 +351,7 @@ class Photo extends BaseModule
|
||||||
}
|
}
|
||||||
|
|
||||||
// If it is a local link, we save resources by just redirecting to it.
|
// If it is a local link, we save resources by just redirecting to it.
|
||||||
if (Network::isLocalLink($url)) {
|
if (!empty($url) && Network::isLocalLink($url)) {
|
||||||
System::externalRedirect($url);
|
System::externalRedirect($url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user