if (is_null($user) && ($a->argc > (count($called_api) - 1)) && (count($called_api) > 0)) {
$argid = count($called_api);
if (!empty($a->argv[$argid])) {
- list($user, $null) = explode(".", $a->argv[$argid]);
+ $data = explode(".", $a->argv[$argid]);
+ if (count($data) > 1) {
+ list($user, $null) = $data;
+ }
}
if (is_numeric($user)) {
$user = DBA::escape(api_unique_id_to_nurl(intval($user)));
if ($filetype == "") {
$filetype=Image::guessType($filename);
}
- $imagedata = getimagesize($src);
+ $imagedata = @getimagesize($src);
if ($imagedata) {
$filetype = $imagedata['mime'];
}
} elseif (($a->argc > 1) && ($a->argv[1] == 'home')) {
$notif_header = L10n::t('Home Notifications');
$notifs = $nm->homeNotifs($show, $startrec, $perpage);
-
}
$notif_tpl = get_markup_template('notifications.tpl');
if (!isset($notifs['ident'])) {
- logger('Missing data in notifs: ' . System::callstack(20), LOGGER_DEBUG);
+ logger('Missing data in notifs: ' . json_encode($a->argv), LOGGER_DEBUG);
}
// Process the data for template creation
* @param int $forums_unseen Number of unseen forum items
* @return array XML-transform ready data array
*/
-function ping_format_xml_data($data, $sysnotify, $notifs, $sysmsgs, $sysmsgs_info, $groups_unseen, $forums_unseen)
+function ping_format_xml_data($data, $sysnotify_count, $notifs, $sysmsgs, $sysmsgs_info, $groups_unseen, $forums_unseen)
{
$notifications = [];
foreach ($notifs as $key => $notif) {
if (isset($p['address'])) {
$p['address'] = BBCode::convert($p['address']);
- } else {
+ } elseif (isset($p['location'])) {
$p['address'] = BBCode::convert($p['location']);
}