Quick fix PHP notices in various files
- Remove unused variables - Fix variable name typos - Use x() and defaults() to fix undefined index - Add back uninitialized variables
This commit is contained in:
parent
861c4c7474
commit
9f04017e27
9 changed files with 41 additions and 35 deletions
10
mod/ping.php
10
mod/ping.php
|
@ -164,8 +164,8 @@ function ping_init(App $a)
|
|||
|
||||
if (intval(Feature::isEnabled(local_user(), 'forumlist_widget'))) {
|
||||
$forum_counts = ForumManager::countUnseenItems();
|
||||
if (DBM::is_result($forums_counts)) {
|
||||
foreach ($forums_counts as $forum_count) {
|
||||
if (DBM::is_result($forum_counts)) {
|
||||
foreach ($forum_counts as $forum_count) {
|
||||
if ($forum_count['count'] > 0) {
|
||||
$forums_unseen[] = $forum_count;
|
||||
}
|
||||
|
@ -490,8 +490,10 @@ function ping_get_notifications($uid)
|
|||
|
||||
$notification["href"] = System::baseUrl() . "/notify/view/" . $notification["id"];
|
||||
|
||||
if ($notification["visible"] && !$notification["spam"]
|
||||
&& !$notification["deleted"] && !is_array($result[$notification["parent"]])
|
||||
if ($notification["visible"]
|
||||
&& !$notification["spam"]
|
||||
&& !$notification["deleted"]
|
||||
&& !(x($result, $notification["parent"]) && is_array($result[$notification["parent"]]))
|
||||
) {
|
||||
// Should we condense the notifications or show them all?
|
||||
if (PConfig::get(local_user(), 'system', 'detailed_notif')) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue