aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2019-08-21 18:49:11 -0700
committerzotlabs <mike@macgirvin.com>2019-08-21 18:50:38 -0700
commitd2565519070255af7f127c90b4dadef9c24328f8 (patch)
tree984408e0463d96f5acf3ff5105445ea1f1cc8443
parentb325b2c003ae73c8c9869d35b15444fe9a17fd74 (diff)
downloadvolse-hubzilla-d2565519070255af7f127c90b4dadef9c24328f8.tar.gz
volse-hubzilla-d2565519070255af7f127c90b4dadef9c24328f8.tar.bz2
volse-hubzilla-d2565519070255af7f127c90b4dadef9c24328f8.zip
possible for DB to return hublocs with no sitekey
-rw-r--r--Zotlabs/Lib/Queue.php2
-rw-r--r--include/queue_fn.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/Zotlabs/Lib/Queue.php b/Zotlabs/Lib/Queue.php
index baa1da70d..49891a55b 100644
--- a/Zotlabs/Lib/Queue.php
+++ b/Zotlabs/Lib/Queue.php
@@ -250,7 +250,7 @@ class Queue {
$host_crypto = null;
if($channel && $base) {
- $h = q("select hubloc_sitekey, site_crypto from hubloc left join site on hubloc_url = site_url where site_url = '%s' order by hubloc_id desc limit 1",
+ $h = q("select hubloc_sitekey, site_crypto from hubloc left join site on hubloc_url = site_url where site_url = '%s' and hubloc_sitekey != '' order by hubloc_id desc limit 1",
dbesc($base)
);
if($h) {
diff --git a/include/queue_fn.php b/include/queue_fn.php
index 85f98aaf9..865228041 100644
--- a/include/queue_fn.php
+++ b/include/queue_fn.php
@@ -286,7 +286,7 @@ function queue_deliver($outq, $immediate = false) {
$host_crypto = null;
if($channel && $base) {
- $h = q("select hubloc_sitekey, site_crypto from hubloc left join site on hubloc_url = site_url where site_url = '%s' order by hubloc_id desc limit 1",
+ $h = q("select hubloc_sitekey, site_crypto from hubloc left join site on hubloc_url = site_url where site_url = '%s' and hubloc_sitekey != '' order by hubloc_id desc limit 1",
dbesc($base)
);
if($h) {