Skip to:
Content

bbPress.org


Ignore:
Timestamp:
12/08/2016 02:43:27 PM (5 years ago)
Author:
johnjamesjacoby
Message:

Tools: Fix undeclared variables and incorrect variable types, for improved PHP 7.1 compatibility.

This will quiet down most of our continuous integration noise.

Props hellofromTonya. Fixes #3031.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/common/functions.php

    r6115 r6135  
    513513        if ( current_user_can( 'read_private_topics' ) || current_user_can( 'edit_others_topics' ) || current_user_can( 'view_trash' ) ) {
    514514
     515            // Declare empty arrays
     516            $topics = $topic_titles = array();
     517
    515518            // Pending
    516519            $topics['pending'] = ( ! empty( $r['count_pending_topics'] ) && current_user_can( 'edit_others_topics' ) ) ? (int) $all_topics->{$pending} : 0;
     
    549552        if ( current_user_can( 'read_private_replies' ) || current_user_can( 'edit_others_replies' ) || current_user_can( 'view_trash' ) ) {
    550553
     554            // Declare empty arrays
     555            $replies = $reply_titles = array();
     556
    551557            // Pending
    552558            $replies['pending'] = ( ! empty( $r['count_pending_replies'] ) && current_user_can( 'edit_others_replies' ) ) ? (int) $all_replies->{$pending} : 0;
     
    572578            // Compile the hidden replies title
    573579            $hidden_reply_title = implode( ' | ', array_filter( $reply_titles ) );
    574 
    575580        }
    576581    }
Note: See TracChangeset for help on using the changeset viewer.