check that we have valid data
This commit is contained in:
parent
1eacea4037
commit
50c16c394f
@ -2813,6 +2813,7 @@ function import_author_zot($x) {
|
|||||||
function zot_process_message_request($data) {
|
function zot_process_message_request($data) {
|
||||||
$ret = array('success' => false);
|
$ret = array('success' => false);
|
||||||
|
|
||||||
|
// note: disabled until the loops stop.
|
||||||
return $ret;
|
return $ret;
|
||||||
|
|
||||||
if(! $data['message_id']) {
|
if(! $data['message_id']) {
|
||||||
|
26
mod/post.php
26
mod/post.php
@ -598,18 +598,24 @@ function post_post(&$a) {
|
|||||||
$ret['success'] = true;
|
$ret['success'] = true;
|
||||||
$ret['pickup'] = array();
|
$ret['pickup'] = array();
|
||||||
foreach($r as $rr) {
|
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)) {
|
if(! $x)
|
||||||
foreach($x['message_list'] as $xx)
|
continue;
|
||||||
$ret['pickup'][] = array('notify' => json_decode($rr['outq_notify'],true),'message' => $xx);
|
|
||||||
|
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'])
|
||||||
|
);
|
||||||
}
|
}
|
||||||
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'])
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user