Replace deprecated sort rand with shuffle

This commit is contained in:
3Dgoo 2023-08-10 12:31:45 +09:30 committed by GitHub
commit bcbb40e08d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,7 +84,7 @@ class BlogFeaturedPostsWidget extends Widget
return $blog->getBlogPosts() return $blog->getBlogPosts()
->filter('ID:not', Director::get_current_page()->ID) ->filter('ID:not', Director::get_current_page()->ID)
->filter('FeaturedInWidget', true) ->filter('FeaturedInWidget', true)
->sort('RAND()') ->shuffle()
->limit($this->NumberOfPosts); ->limit($this->NumberOfPosts);
} }