mirror of
https://github.com/friendica/friendica
synced 2024-11-10 05:02:58 +00:00
Merge pull request #7846 from annando/notes-warnings
Fix further notes and warnings
This commit is contained in:
commit
91491dd798
2 changed files with 13 additions and 6 deletions
|
@ -1061,12 +1061,12 @@ class GServer
|
|||
$attr = [];
|
||||
if ($node->attributes->length) {
|
||||
foreach ($node->attributes as $attribute) {
|
||||
$attribute->value = @trim($attribute->value);
|
||||
if (empty($attribute->value)) {
|
||||
$value = trim($attribute->value);
|
||||
if (empty($value)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$attr[$attribute->name] = $attribute->value;
|
||||
$attr[$attribute->name] = $value;
|
||||
}
|
||||
|
||||
if (empty($attr['name']) || empty($attr['content'])) {
|
||||
|
@ -1117,12 +1117,12 @@ class GServer
|
|||
$attr = [];
|
||||
if ($node->attributes->length) {
|
||||
foreach ($node->attributes as $attribute) {
|
||||
$attribute->value = @trim($attribute->value);
|
||||
if (empty($attribute->value)) {
|
||||
$value = trim($attribute->value);
|
||||
if (empty($value)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$attr[$attribute->name] = $attribute->value;
|
||||
$attr[$attribute->name] = $value;
|
||||
}
|
||||
|
||||
if (empty($attr['property']) || empty($attr['content'])) {
|
||||
|
|
|
@ -653,6 +653,9 @@ class Transmitter
|
|||
public static function ItemArrayFromMail($mail_id)
|
||||
{
|
||||
$mail = DBA::selectFirst('mail', [], ['id' => $mail_id]);
|
||||
if (!DBA::isResult($mail)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$reply = DBA::selectFirst('mail', ['uri'], ['parent-uri' => $mail['parent-uri'], 'reply' => false]);
|
||||
|
||||
|
@ -1234,6 +1237,10 @@ class Transmitter
|
|||
*/
|
||||
public static function createNote($item)
|
||||
{
|
||||
if (empty($item)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
if ($item['event-type'] == 'event') {
|
||||
$type = 'Event';
|
||||
} elseif (!empty($item['title'])) {
|
||||
|
|
Loading…
Reference in a new issue