mirror of
https://github.com/friendica/friendica
synced 2025-04-29 13:44:23 +02:00
Fix for several fatal errors
This commit is contained in:
parent
08da1ed038
commit
0fdab4ed10
6 changed files with 12 additions and 13 deletions
|
@ -2512,7 +2512,7 @@ class DFRN
|
|||
}
|
||||
|
||||
$notice_info = $xpath->query("statusnet:notice_info", $entry);
|
||||
if ($notice_info && ($notice_info->length > 0)) {
|
||||
if ($notice_info && ($notice_info->length > 0) && !empty($notice_info->item)) {
|
||||
foreach ($notice_info->item[0]->attributes as $attributes) {
|
||||
if ($attributes->name == "source") {
|
||||
$item["app"] = strip_tags($attributes->textContent);
|
||||
|
@ -2588,7 +2588,7 @@ class DFRN
|
|||
$item['conversation-uri'] = XML::getFirstNodeValue($xpath, 'ostatus:conversation/text()', $entry);
|
||||
|
||||
$conv = $xpath->query('ostatus:conversation', $entry);
|
||||
if (is_object($conv->item[0])) {
|
||||
if (!empty($conv->item[0])) {
|
||||
foreach ($conv->item[0]->attributes as $attributes) {
|
||||
if ($attributes->name == "ref") {
|
||||
$item['conversation-uri'] = $attributes->textContent;
|
||||
|
@ -2603,7 +2603,7 @@ class DFRN
|
|||
$item["parent-uri"] = $item["uri"];
|
||||
|
||||
$inreplyto = $xpath->query("thr:in-reply-to", $entry);
|
||||
if (is_object($inreplyto->item[0])) {
|
||||
if (!empty($inreplyto->item[0])) {
|
||||
foreach ($inreplyto->item[0]->attributes as $attributes) {
|
||||
if ($attributes->name == "ref") {
|
||||
$item["parent-uri"] = $attributes->textContent;
|
||||
|
|
|
@ -53,7 +53,7 @@ class OStatus
|
|||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
* @throws \ImagickException
|
||||
*/
|
||||
private static function fetchAuthor(DOMXPath $xpath, $context, array $importer, array &$contact, $onlyfetch)
|
||||
private static function fetchAuthor(DOMXPath $xpath, $context, array $importer, &$contact, $onlyfetch)
|
||||
{
|
||||
$author = [];
|
||||
$author["author-link"] = XML::getFirstNodeValue($xpath, 'atom:author/atom:uri/text()', $context);
|
||||
|
@ -322,7 +322,7 @@ class OStatus
|
|||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
* @throws \ImagickException
|
||||
*/
|
||||
private static function process($xml, array $importer, array &$contact, &$hub, $stored = false, $initialize = true)
|
||||
private static function process($xml, array $importer, &$contact, &$hub, $stored = false, $initialize = true)
|
||||
{
|
||||
if ($initialize) {
|
||||
self::$itemlist = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue