more data checking, cleans up some infrequent php errors
This commit is contained in:
parent
7c6bc5a93d
commit
79f3bbbf2b
2 changed files with 10 additions and 0 deletions
|
@ -188,6 +188,13 @@ function diaspora_msg_build($msg,$user,$contact,$prvkey,$pubkey,$public = false)
|
||||||
|
|
||||||
logger('diaspora_msg_build: ' . $msg, LOGGER_DATA);
|
logger('diaspora_msg_build: ' . $msg, LOGGER_DATA);
|
||||||
|
|
||||||
|
// without a public key nothing will work
|
||||||
|
|
||||||
|
if(! $pubkey) {
|
||||||
|
logger('diaspora_msg_build: pubkey missing: contact id: ' . $contact['id']);
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
$inner_aes_key = random_string(32);
|
$inner_aes_key = random_string(32);
|
||||||
$b_inner_aes_key = base64_encode($inner_aes_key);
|
$b_inner_aes_key = base64_encode($inner_aes_key);
|
||||||
$inner_iv = random_string(16);
|
$inner_iv = random_string(16);
|
||||||
|
|
|
@ -58,6 +58,9 @@ function poco_load($cid,$uid = 0,$url = null) {
|
||||||
|
|
||||||
logger('poco_load: json: ' . print_r($j,true),LOGGER_DATA);
|
logger('poco_load: json: ' . print_r($j,true),LOGGER_DATA);
|
||||||
|
|
||||||
|
if(! isset($j->entry))
|
||||||
|
return;
|
||||||
|
|
||||||
$total = 0;
|
$total = 0;
|
||||||
foreach($j->entry as $entry) {
|
foreach($j->entry as $entry) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue