Skip to content

Commit

Permalink
Don't use 'strlen' callback for array_filter().
Browse files Browse the repository at this point in the history
This throws a warning in later PHP because `strlen` does not return
boolean values. Instead, we let `array_filter` use the default
`empty()` callback.
  • Loading branch information
boonebgorges committed Feb 22, 2024
1 parent fed4419 commit 5abb3cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Core/Schema/Feeds.php
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ public function deal_with_old_feedlists() {
$all_feeds_array = apply_filters( 'imported_rss_feeds', $feedlist );
pf_log( 'Preparing to transform feedlist into a list of feed posts.' );
$ordered_all_feeds_array = array_values( $all_feeds_array );
$tidy_all_feeds_array = array_filter( $ordered_all_feeds_array, 'strlen' );
$tidy_all_feeds_array = array_filter( $ordered_all_feeds_array );
foreach ( $tidy_all_feeds_array as $key => $feed ) {
$feedlist = $this->progressive_feedlist_transformer( $tidy_all_feeds_array, $feed, $key );
}
Expand Down

0 comments on commit 5abb3cd

Please sign in to comment.