Skip to:
Content

bbPress.org

Changeset 6647


Ignore:
Timestamp:
08/10/2017 02:48:42 PM (7 years ago)
Author:
johnjamesjacoby
Message:

Fix undeclared arrays for PHP 7.1 compatibility.

Props hellofromTonya. See #3031. (2.5 branch)

Location:
branches/2.5/includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/2.5/includes/common/functions.php

    r6512 r6647  
    497497        if ( current_user_can( 'read_private_topics' ) || current_user_can( 'edit_others_topics' ) || current_user_can( 'view_trash' ) ) {
    498498
     499            // Declare empty arrays
     500            $topics = $topic_titles = array();
     501
    499502            // Private
    500503            $topics['private'] = ( !empty( $r['count_private_topics'] ) && current_user_can( 'read_private_topics' ) ) ? (int) $all_topics->{$private} : 0;
     
    528531
    529532        if ( current_user_can( 'read_private_replies' ) || current_user_can( 'edit_others_replies' ) || current_user_can( 'view_trash' ) ) {
     533
     534            // Declare empty arrays
     535            $replies = $reply_titles = array();
    530536
    531537            // Private
  • branches/2.5/includes/forums/functions.php

    r6417 r6647  
    17981798        // Default to public status
    17991799        if ( empty( $post_stati ) ) {
    1800             $post_stati[] = bbp_get_public_status_id();
     1800            $post_stati = array( bbp_get_public_status_id() );
    18011801
    18021802        // Split the status string
  • branches/2.5/includes/users/template.php

    r6120 r6647  
    16591659            $anonymous = bbp_is_reply_anonymous( $r['post_id'] );
    16601660
     1661            // Declare empty array
     1662            $author_links = array();
     1663
    16611664            // Get avatar
    16621665            if ( 'avatar' === $r['type'] || 'both' === $r['type'] ) {
Note: See TracChangeset for help on using the changeset viewer.