Skip to:
Content

bbPress.org

Changeset 6360


Ignore:
Timestamp:
03/03/2017 09:31:04 PM (9 years ago)
Author:
johnjamesjacoby
Message:

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

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

Props SergeyBiryukov. Fixes #3053.

File:
1 edited

Legend:

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

    r6341 r6360  
    438438
    439439                // Get pre_trashed_replies for topic
    440                 $pre_trashed_replies = get_post_meta( $topic_id, '_bbp_pre_trashed_replies', true );
     440                $pre_trashed_replies = (array) get_post_meta( $topic_id, '_bbp_pre_trashed_replies', true );
    441441
    442442                // Add this reply to the end of the existing replies
     
    457457
    458458                // Get pre_spammed_replies for topic
    459                 $pre_spammed_replies = get_post_meta( $topic_id, '_bbp_pre_spammed_replies', true );
     459                $pre_spammed_replies = (array) get_post_meta( $topic_id, '_bbp_pre_spammed_replies', true );
    460460
    461461                // Add this reply to the end of the existing replies
Note: See TracChangeset for help on using the changeset viewer.