diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-07-15 18:31:37 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-07-15 18:31:37 -0700 |
commit | 7db515b77cc17be545358ac1aba9b6b21c460507 (patch) | |
tree | dae5fd25abe612d84a0e3f89e8c9640377e05bfb /include | |
parent | 59b67d52e60d51faa39cdad1921a64e8f64ea0ae (diff) | |
download | volse-hubzilla-7db515b77cc17be545358ac1aba9b6b21c460507.tar.gz volse-hubzilla-7db515b77cc17be545358ac1aba9b6b21c460507.tar.bz2 volse-hubzilla-7db515b77cc17be545358ac1aba9b6b21c460507.zip |
fix for empty recip array resulting from a mangled xchan
Diffstat (limited to 'include')
-rw-r--r-- | include/zot.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/include/zot.php b/include/zot.php index 4f80dc518..95de349fe 100644 --- a/include/zot.php +++ b/include/zot.php @@ -1114,11 +1114,14 @@ function zot_import($arr, $sender_url) { $recip_arr[] = make_xchan_hash($recip['guid'],$recip['guid_sig']); } } - stringify_array_elms($recip_arr); - $recips = implode(',',$recip_arr); - $r = q("select channel_hash as hash from channel where channel_hash in ( " . $recips . " ) and not ( channel_pageflags & %d ) > 0 ", - intval(PAGE_REMOVED) - ); + $r = false; + if($recip_arr) { + stringify_array_elms($recip_arr); + $recips = implode(',',$recip_arr); + $r = q("select channel_hash as hash from channel where channel_hash in ( " . $recips . " ) and not ( channel_pageflags & %d ) > 0 ", + intval(PAGE_REMOVED) + ); + } if(! $r) { logger('recips: no recipients on this site'); continue; |