Merge pull request #5520 from annando/notices

Some more notices removed
This commit is contained in:
Tobias Diekershoff 2018-07-29 08:20:11 +02:00 committed by GitHub
commit 63131189fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 5 deletions

View file

@ -46,7 +46,7 @@ function cal_init(App $a)
// if it's a json request abort here becaus we don't // if it's a json request abort here becaus we don't
// need the widget data // need the widget data
if ($a->argv[2] === 'json') { if (!empty($a->argv[2]) && ($a->argv[2] === 'json')) {
return; return;
} }
@ -194,7 +194,7 @@ function cal_content(App $a)
$finish = sprintf('%d-%d-%d %d:%d:%d', $y, $m, $dim, 23, 59, 59); $finish = sprintf('%d-%d-%d %d:%d:%d', $y, $m, $dim, 23, 59, 59);
if ($a->argv[2] === 'json') { if (!empty($a->argv[2]) && ($a->argv[2] === 'json')) {
if (x($_GET, 'start')) { if (x($_GET, 'start')) {
$start = $_GET['start']; $start = $_GET['start'];
} }
@ -242,7 +242,7 @@ function cal_content(App $a)
// transform the event in a usable array // transform the event in a usable array
$events = Event::prepareListForTemplate($r); $events = Event::prepareListForTemplate($r);
if ($a->argv[2] === 'json') { if (!empty($a->argv[2]) && ($a->argv[2] === 'json')) {
echo json_encode($events); echo json_encode($events);
killme(); killme();
} }

View file

@ -152,7 +152,7 @@ class OEmbed
$oembed->description = $data['text']; $oembed->description = $data['text'];
} }
if (is_array($data['images'])) { if (!empty($data['images'])) {
$oembed->thumbnail_url = $data['images'][0]['src']; $oembed->thumbnail_url = $data['images'][0]['src'];
$oembed->thumbnail_width = $data['images'][0]['width']; $oembed->thumbnail_width = $data['images'][0]['width'];
$oembed->thumbnail_height = $data['images'][0]['height']; $oembed->thumbnail_height = $data['images'][0]['height'];

View file

@ -102,7 +102,6 @@ class PermissionSet extends BaseObject
$set[] = $permission['id']; $set[] = $permission['id'];
} }
DBA::close($ret); DBA::close($ret);
logger('Blubb: '.$uid.' - '.$contact_id.': '.implode(', ', $set));
return $set; return $set;
} }

View file

@ -116,6 +116,10 @@ class Profile
return; return;
} }
if (empty($pdata)) {
$pdata = ['uid' => 0, 'profile_uid' => 0, 'is-default' => false,'name' => $nickname];
}
// fetch user tags if this isn't the default profile // fetch user tags if this isn't the default profile
if (!$pdata['is-default']) { if (!$pdata['is-default']) {