Fix warnings
This commit is contained in:
parent
6d53036a9f
commit
80917018e9
|
@ -1061,7 +1061,7 @@ class GServer
|
||||||
$attr = [];
|
$attr = [];
|
||||||
if ($node->attributes->length) {
|
if ($node->attributes->length) {
|
||||||
foreach ($node->attributes as $attribute) {
|
foreach ($node->attributes as $attribute) {
|
||||||
$attribute->value = trim($attribute->value);
|
$attribute->value = @trim($attribute->value);
|
||||||
if (empty($attribute->value)) {
|
if (empty($attribute->value)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -1117,7 +1117,7 @@ class GServer
|
||||||
$attr = [];
|
$attr = [];
|
||||||
if ($node->attributes->length) {
|
if ($node->attributes->length) {
|
||||||
foreach ($node->attributes as $attribute) {
|
foreach ($node->attributes as $attribute) {
|
||||||
$attribute->value = trim($attribute->value);
|
$attribute->value = @trim($attribute->value);
|
||||||
if (empty($attribute->value)) {
|
if (empty($attribute->value)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -422,7 +422,7 @@ class Feed {
|
||||||
$data = ParseUrl::getSiteinfoCached($item['plink'], true);
|
$data = ParseUrl::getSiteinfoCached($item['plink'], true);
|
||||||
if (!empty($data['text']) && !empty($data['title']) && (mb_strlen($item['body']) < mb_strlen($data['text']))) {
|
if (!empty($data['text']) && !empty($data['title']) && (mb_strlen($item['body']) < mb_strlen($data['text']))) {
|
||||||
// When the fetched page info text is longer than the body, we do try to enhance the body
|
// When the fetched page info text is longer than the body, we do try to enhance the body
|
||||||
if ((strpos($data['title'], $item['body']) === false) && (strpos($data['text'], $item['body']) === false)) {
|
if (!empty($item['body']) && (strpos($data['title'], $item['body']) === false) && (strpos($data['text'], $item['body']) === false)) {
|
||||||
// The body is not part of the fetched page info title or page info text. So we add the text to the body
|
// The body is not part of the fetched page info title or page info text. So we add the text to the body
|
||||||
$item['body'] .= "\n\n" . $data['text'];
|
$item['body'] .= "\n\n" . $data['text'];
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue