Merge pull request #8823 from annando/keyword-notices
Fix notice "Undefined index: keywords"
This commit is contained in:
commit
64ba2f9b61
|
@ -176,7 +176,7 @@ class PageInfo
|
||||||
|
|
||||||
if (!$keywords) {
|
if (!$keywords) {
|
||||||
unset($data['keywords']);
|
unset($data['keywords']);
|
||||||
} elseif ($keyword_denylist) {
|
} elseif ($keyword_denylist && !empty($data['keywords'])) {
|
||||||
$list = explode(', ', $keyword_denylist);
|
$list = explode(', ', $keyword_denylist);
|
||||||
|
|
||||||
foreach ($list as $keyword) {
|
foreach ($list as $keyword) {
|
||||||
|
@ -205,6 +205,10 @@ class PageInfo
|
||||||
{
|
{
|
||||||
$data = self::queryUrl($url, $photo, true, $keyword_denylist);
|
$data = self::queryUrl($url, $photo, true, $keyword_denylist);
|
||||||
|
|
||||||
|
if (empty($data['keywords'])) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
$taglist = [];
|
$taglist = [];
|
||||||
foreach ($data['keywords'] as $keyword) {
|
foreach ($data['keywords'] as $keyword) {
|
||||||
$hashtag = str_replace([' ', '+', '/', '.', '#', "'"],
|
$hashtag = str_replace([' ', '+', '/', '.', '#', "'"],
|
||||||
|
|
Loading…
Reference in a new issue