aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-11-01 01:52:27 -0700
committerfriendica <info@friendica.com>2014-11-01 01:52:27 -0700
commit50c16c394fe2d966c62d30930600212a4e33303e (patch)
treeae59c8697b9fd20c33aeaf8acb3a698b63e9657b
parent1eacea403758981670eb589b6626f531612429d1 (diff)
downloadvolse-hubzilla-50c16c394fe2d966c62d30930600212a4e33303e.tar.gz
volse-hubzilla-50c16c394fe2d966c62d30930600212a4e33303e.tar.bz2
volse-hubzilla-50c16c394fe2d966c62d30930600212a4e33303e.zip
check that we have valid data
-rw-r--r--include/zot.php1
-rw-r--r--mod/post.php26
2 files changed, 17 insertions, 10 deletions
diff --git a/include/zot.php b/include/zot.php
index 4c47d60b8..24ace9cbb 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -2813,6 +2813,7 @@ function import_author_zot($x) {
function zot_process_message_request($data) {
$ret = array('success' => false);
+// note: disabled until the loops stop.
return $ret;
if(! $data['message_id']) {
diff --git a/mod/post.php b/mod/post.php
index 8ffd3b5ad..c21af83e4 100644
--- a/mod/post.php
+++ b/mod/post.php
@@ -598,18 +598,24 @@ function post_post(&$a) {
$ret['success'] = true;
$ret['pickup'] = array();
foreach($r as $rr) {
- $x = json_decode($rr['outq_msg'],true);
+ if($rr['outq_msg']) {
+ $x = json_decode($rr['outq_msg'],true);
- if(array_key_exists('message_list',$x)) {
- foreach($x['message_list'] as $xx)
- $ret['pickup'][] = array('notify' => json_decode($rr['outq_notify'],true),'message' => $xx);
- }
- else
- $ret['pickup'][] = array('notify' => json_decode($rr['outq_notify'],true),'message' => $x);
+ if(! $x)
+ continue;
- $x = q("delete from outq where outq_hash = '%s' limit 1",
- dbesc($rr['outq_hash'])
- );
+ if(array_key_exists('message_list',$x)) {
+ foreach($x['message_list'] as $xx) {
+ $ret['pickup'][] = array('notify' => json_decode($rr['outq_notify'],true),'message' => $xx);
+ }
+ }
+ else
+ $ret['pickup'][] = array('notify' => json_decode($rr['outq_notify'],true),'message' => $x);
+
+ $x = q("delete from outq where outq_hash = '%s' limit 1",
+ dbesc($rr['outq_hash'])
+ );
+ }
}
}