From e171a1cd22a9b328f5941ce0cc756de4789581da Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sun, 18 Sep 2016 23:34:50 +0200 Subject: [PATCH] Some fixes: - avoids warning if no result is coming back - brought back init variable before using it Signed-off-by: Roland Haeder --- mod/dfrn_request.php | 2 ++ mod/network.php | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php index 0162ecf193..4953a0c996 100644 --- a/mod/dfrn_request.php +++ b/mod/dfrn_request.php @@ -732,6 +732,8 @@ function dfrn_request_content(&$a) { intval($intro[0]['contact-id']) ); + $auto_confirm = false; + if(dbm::is_result($r)) { if(($r[0]['page-flags'] != PAGE_NORMAL) && ($r[0]['page-flags'] != PAGE_PRVGROUP)) $auto_confirm = true; diff --git a/mod/network.php b/mod/network.php index 0222e33401..c53a7eb90f 100644 --- a/mod/network.php +++ b/mod/network.php @@ -728,7 +728,9 @@ function network_content(&$a, $update = 0) { intval($parents), intval($max_comments + 1) ); - $items = array_merge($items, $thread_items); + + if (dbm::is_result($thread_items)) + $items = array_merge($items, $thread_items); } $items = conv_sort($items,$ordering); } else { -- 2.39.5