Replace deprecated sort rand with shuffle

This commit is contained in:
3Dgoo 2023-08-10 12:20:25 +09:30 committed by GitHub
parent c93566f7a8
commit 7189427bf3
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);
} }