php warnings

This commit is contained in:
friendica 2014-11-02 19:22:18 -08:00
parent b6e099dd5f
commit 0e4f318b71

View File

@ -1071,7 +1071,7 @@ function zot_import($arr, $sender_url) {
if(array_key_exists('iv',$i['notify'])) {
$i['notify'] = json_decode(crypto_unencapsulate($i['notify'],get_config('system','prvkey')),true);
}
}
logger('zot_import: notify: ' . print_r($i['notify'],true), LOGGER_DATA);
@ -1107,7 +1107,7 @@ function zot_import($arr, $sender_url) {
// It's a specifically targetted post. If we were sent a public_scope hint (likely),
// get rid of it so that it doesn't get stored and cause trouble.
if(array_key_exists('message',$i) && array_key_exists('public_scope',$i['message']))
if(($i) && is_array($i) && array_key_exists('message',$i) && is_array($i['message']) && array_key_exists('public_scope',$i['message']))
unset($i['message']['public_scope']);
$deliveries = $r;
@ -2460,8 +2460,8 @@ function process_channel_sync_delivery($sender,$arr,$deliveries) {
$channel = $r[0];
$max_friends = service_class_fetch($channel['channel_id'],'total_channels');
$max_feeds = account_service_class_fetch($channel['channel_account_id'],'total_feeds');
$max_friends = service_class_fetch($channel['channel_id'],'total_channels');
$max_feeds = account_service_class_fetch($channel['channel_account_id'],'total_feeds');
if($channel['channel_hash'] != $sender['hash']) {
@ -2547,7 +2547,7 @@ function process_channel_sync_delivery($sender,$arr,$deliveries) {
continue;
}
$j = json_decode($f['body'],true);
if(! ($j['success'] && $j['guid'])) {
if(! ($j['success'] && $j['guid'])) {
logger('process_channel_sync_delivery: probe failed.');
continue;
}
@ -2646,8 +2646,8 @@ function process_channel_sync_delivery($sender,$arr,$deliveries) {
intval($channel['channel_id']),
intval($cl['visible']),
intval($cl['deleted']),
dbesc($cl['name'])
);
dbesc($cl['name'])
);
}
// now look for any collections locally which weren't in the list we just received.
@ -2877,13 +2877,13 @@ function zot_process_message_request($data) {
from hubloc where hubloc_hash = '%s' and not (hubloc_flags & %d)
and not (hubloc_status & %d) group by hubloc_sitekey",
dbesc($sender_hash),
intval(HUBLOC_FLAGS_DELETED),
intval(HUBLOC_OFFLINE)
);
if(! $r) {
logger('no hubs');
return $ret;
}
intval(HUBLOC_FLAGS_DELETED),
intval(HUBLOC_OFFLINE)
);
if(! $r) {
logger('no hubs');
return $ret;
}
$hubs = $r;
$hublist = array();
$keys = array();