aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xinclude/items.php2
-rw-r--r--include/zot.php5
2 files changed, 6 insertions, 1 deletions
diff --git a/include/items.php b/include/items.php
index eb58f9f0a..863fa419b 100755
--- a/include/items.php
+++ b/include/items.php
@@ -1437,7 +1437,7 @@ function item_store($arr,$force_parent = false) {
intval($arr['uid'])
);
- if(count($r)) {
+ if($r) {
// is the new message multi-level threaded?
// even though we don't support it now, preserve the info
diff --git a/include/zot.php b/include/zot.php
index b89992a42..829d219b9 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -164,6 +164,11 @@ function zot_finger($webbie,$channel) {
$xchan_addr = $address . '@' . $host;
+ if((! $address) || (! $xchan_addr)) {
+ logger('zot_finger: no address :' . $webbie);
+ return array('success' => false);
+ }
+
$r = q("select xchan.*, hubloc.* from xchan
left join hubloc on xchan_hash = hubloc_hash
where xchan_addr = '%s' and (hubloc_flags & %d) limit 1",