Make WordPress Core


Ignore:
Timestamp:
04/18/2010 05:11:05 AM (15 years ago)
Author:
nacin
Message:

Fix sticky post handling. Use unset instead of array_splice to remove an item by key retrieved by array_search. props jeffstieler, fixes #11966.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/query.php

    r14121 r14135  
    24632463                    // Remove post from sticky posts array
    24642464                    $offset = array_search($sticky_post->ID, $sticky_posts);
    2465                     array_splice($sticky_posts, $offset, 1);
     2465                    unset( $sticky_posts[$offset] );
    24662466                }
    24672467            }
Note: See TracChangeset for help on using the changeset viewer.