Merge pull request #11396 from annando/issue-11393

Issue 11393: Fix failing preview
This commit is contained in:
Hypolite Petovan 2022-04-06 12:36:10 -04:00 committed by GitHub
commit 8669f12176
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3191,9 +3191,9 @@ class Item
*/ */
public static function getPlink($item) public static function getPlink($item)
{ {
if (Network::isValidHttpUrl($item['plink'])) { if (!empty($item['plink']) && Network::isValidHttpUrl($item['plink'])) {
$plink = $item['plink']; $plink = $item['plink'];
} elseif (Network::isValidHttpUrl($item['uri']) && !Network::isLocalLink($item['uri'])) { } elseif (!empty($item['uri']) && Network::isValidHttpUrl($item['uri']) && !Network::isLocalLink($item['uri'])) {
$plink = $item['uri']; $plink = $item['uri'];
} }