if (local_user()) {
// Different login session than the page that is calling us.
- if (intval($_GET['uid']) && intval($_GET['uid']) != local_user()) {
+ if (!empty($_GET['uid']) && intval($_GET['uid']) != local_user()) {
$data = ['result' => ['invalid' => 1]];
if ($format == 'json') {
if (DBA::isResult($notifs)) {
// Are the nofications called from the regular process or via the friendica app?
- $regularnotifications = (intval($_GET['uid']) && intval($_GET['_']));
+ $regularnotifications = (!empty($_GET['uid']) && !empty($_GET['_']));
foreach ($notifs as $notif) {
if ($a->is_friendica_app() || !$regularnotifications) {
* @brief Backward-compatible XML formatting for ping.php output
* @deprecated
*
- * @param array $data The initial ping data array
- * @param int $sysnotify Number of unseen system notifications
- * @param array $notifs Complete list of notification
- * @param array $sysmsgs List of system notice messages
- * @param array $sysmsgs_info List of system info messages
- * @param int $groups_unseen Number of unseen group items
- * @param int $forums_unseen Number of unseen forum items
+ * @param array $data The initial ping data array
+ * @param int $sysnotify_count Number of unseen system notifications
+ * @param array $notifs Complete list of notification
+ * @param array $sysmsgs List of system notice messages
+ * @param array $sysmsgs_info List of system info messages
+ * @param int $groups_unseen Number of unseen group items
+ * @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) {