Skip to:
Content

bbPress.org

Changeset 6416


Ignore:
Timestamp:
05/19/2017 09:18:40 AM (9 years ago)
Author:
netweb
Message:

Trash: Cast _pre_ post-meta values to an array.

Prevents notices & warnings in the event 0 or 1 replies exist.

Props SergeyBiryukov.
See #3053.
Merges [6360] to the 2.5 branch.

File:
1 edited

Legend:

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

    r6021 r6416  
    391391
    392392                // Get pre_trashed_replies for topic
    393                 $pre_trashed_replies = get_post_meta( $topic_id, '_bbp_pre_trashed_replies', true );
     393                $pre_trashed_replies = (array) get_post_meta( $topic_id, '_bbp_pre_trashed_replies', true );
    394394
    395395                // Add this reply to the end of the existing replies
     
    410410
    411411                // Get pre_spammed_replies for topic
    412                 $pre_spammed_replies = get_post_meta( $topic_id, '_bbp_pre_spammed_replies', true );
     412                $pre_spammed_replies = (array) get_post_meta( $topic_id, '_bbp_pre_spammed_replies', true );
    413413
    414414                // Add this reply to the end of the existing replies
Note: See TracChangeset for help on using the changeset viewer.