Make sure get_bookmarks cache is an array
git-svn-id: http://svn.automattic.com/wordpress/trunk@10229 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
61ff0372e4
commit
5183a7e189
|
@ -142,10 +142,15 @@ function get_bookmarks($args = '') {
|
|||
$r = wp_parse_args( $args, $defaults );
|
||||
extract( $r, EXTR_SKIP );
|
||||
|
||||
$cache = array();
|
||||
$key = md5( serialize( $r ) );
|
||||
if ( $cache = wp_cache_get( 'get_bookmarks', 'bookmark' ) )
|
||||
if ( isset( $cache[ $key ] ) )
|
||||
if ( $cache = wp_cache_get( 'get_bookmarks', 'bookmark' ) ) {
|
||||
if ( is_array($cache) && isset( $cache[ $key ] ) )
|
||||
return apply_filters('get_bookmarks', $cache[ $key ], $r );
|
||||
}
|
||||
|
||||
if ( !is_array($cache) )
|
||||
$cache = array();
|
||||
|
||||
$inclusions = '';
|
||||
if ( !empty($include) ) {
|
||||
|
|
Loading…
Reference in New Issue