Skip to:
Content

bbPress.org

Changeset 7299


Ignore:
Timestamp:
06/25/2025 12:05:40 AM (9 months ago)
Author:
johnjamesjacoby
Message:

Forums: cast return value of post__not_in as array.

This change avoids a potentially fatal PHP error if that query variable is a string.

Props rollybueno.

In trunk, for 2.7.

Fixes #3636.

File:
1 edited

Legend:

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

    r7275 r7299  
    23302330
    23312331            // Get any existing not-in queries
    2332             $not_in = $posts_query->get( 'post__not_in', array() );
     2332            $not_in = (array) $posts_query->get( 'post__not_in', array() );
    23332333
    23342334            // Add our not-in to existing
Note: See TracChangeset for help on using the changeset viewer.