Skip to content

Commit

Permalink
Merge pull request #53 from humanmade/fix/off-by-two-count
Browse files Browse the repository at this point in the history
Fix an incorrect count for the Files iterator
  • Loading branch information
tcrsavage authored Mar 21, 2019
2 parents 17652a4 + 3342dd8 commit b83b881
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inc/classes/iterator/files/class-base.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function get_count() {

$files_in_path = $this->get_files_in_path();

return is_wp_error( $files_in_path ) ? $files_in_path : count( $files_in_path );
return is_wp_error( $files_in_path ) ? $files_in_path : count( $this->filter_files( $files_in_path ) );
}

/**
Expand Down

0 comments on commit b83b881

Please sign in to comment.