Merge pull request #720 from 3Dgoo/4

Replace deprecated sort rand with shuffle
This commit is contained in:
Guy Sartorelli 2023-08-19 11:02:43 +12:00 committed by GitHub
commit b9c535ac67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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