Merge pull request #5941 from MrPetovan/bug/5932-fix-notices
Fix PHP notices S02E02
This commit is contained in:
commit
ae85543aec
|
@ -73,6 +73,7 @@ function parse_url_content(App $a)
|
|||
$hdrs[$k] = $v;
|
||||
}
|
||||
}
|
||||
$type = null;
|
||||
if (array_key_exists('Content-Type', $hdrs)) {
|
||||
$type = $hdrs['Content-Type'];
|
||||
}
|
||||
|
|
|
@ -380,7 +380,7 @@ class Item extends BaseObject
|
|||
$usermode = true;
|
||||
}
|
||||
|
||||
$fields = self::fieldlist($selected, $usermode);
|
||||
$fields = self::fieldlist($usermode);
|
||||
|
||||
$select_fields = self::constructSelectFields($fields, $selected);
|
||||
|
||||
|
@ -487,7 +487,7 @@ class Item extends BaseObject
|
|||
$usermode = true;
|
||||
}
|
||||
|
||||
$fields = self::fieldlist($selected, $usermode);
|
||||
$fields = self::fieldlist($usermode);
|
||||
|
||||
$fields['thread'] = ['mention', 'ignored', 'iid'];
|
||||
|
||||
|
@ -523,7 +523,7 @@ class Item extends BaseObject
|
|||
*
|
||||
* @return array field list
|
||||
*/
|
||||
private static function fieldlist($selected, $usermode)
|
||||
private static function fieldlist($usermode)
|
||||
{
|
||||
$fields = [];
|
||||
|
||||
|
|
|
@ -461,7 +461,7 @@ class Receiver
|
|||
|
||||
logger('Switch contact ' . $cid . ' (' . $profile['url'] . ') for user ' . $uid . ' to ActivityPub');
|
||||
|
||||
$photo = $profile['photo'];
|
||||
$photo = defaults($profile, 'photo', null);
|
||||
unset($profile['photo']);
|
||||
unset($profile['baseurl']);
|
||||
|
||||
|
@ -478,7 +478,7 @@ class Receiver
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param $receivers
|
||||
* @param $actor
|
||||
|
@ -503,12 +503,12 @@ class Receiver
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param $object_data
|
||||
* @param array $activity
|
||||
*
|
||||
* @return
|
||||
* @return
|
||||
*/
|
||||
private static function addActivityFields($object_data, $activity)
|
||||
{
|
||||
|
|
|
@ -949,6 +949,7 @@ class Diaspora
|
|||
$person = DBA::selectFirst('fcontact', [], ['network' => Protocol::DIASPORA, 'addr' => $handle]);
|
||||
if (!DBA::isResult($person)) {
|
||||
$person = $r;
|
||||
$person['id'] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3429,12 +3430,9 @@ class Diaspora
|
|||
/// @todo - establish "all day" events in Friendica
|
||||
$eventdata["all_day"] = "false";
|
||||
|
||||
if (!$event['adjust']) {
|
||||
$eventdata['timezone'] = 'UTC';
|
||||
if (!$event['adjust'] && $user['timezone']) {
|
||||
$eventdata['timezone'] = $user['timezone'];
|
||||
|
||||
if ($eventdata['timezone'] == "") {
|
||||
$eventdata['timezone'] = 'UTC';
|
||||
}
|
||||
}
|
||||
|
||||
if ($event['start']) {
|
||||
|
|
|
@ -141,7 +141,7 @@ class ParseUrl
|
|||
}
|
||||
|
||||
// If the file is too large then exit
|
||||
if ($curlResult->getInfo()['download_content_length'] > 1000000) {
|
||||
if (defaults($curlResult->getInfo(), 'download_content_length', 0) > 1000000) {
|
||||
return $siteinfo;
|
||||
}
|
||||
|
||||
|
|
|
@ -39,13 +39,13 @@ class Delivery extends BaseObject
|
|||
$followup = false;
|
||||
$public_message = false;
|
||||
|
||||
$items = [];
|
||||
if ($cmd == self::MAIL) {
|
||||
$target_item = DBA::selectFirst('mail', [], ['id' => $item_id]);
|
||||
if (!DBA::isResult($target_item)) {
|
||||
return;
|
||||
}
|
||||
$uid = $target_item['uid'];
|
||||
$items = [];
|
||||
} elseif ($cmd == self::SUGGESTION) {
|
||||
$target_item = DBA::selectFirst('fsuggest', [], ['id' => $item_id]);
|
||||
if (!DBA::isResult($target_item)) {
|
||||
|
@ -65,7 +65,6 @@ class Delivery extends BaseObject
|
|||
$params = ['order' => ['id']];
|
||||
$itemdata = Item::select([], $condition, $params);
|
||||
|
||||
$items = [];
|
||||
while ($item = Item::fetch($itemdata)) {
|
||||
if ($item['id'] == $parent_id) {
|
||||
$parent = $item;
|
||||
|
|
Loading…
Reference in New Issue
Block a user