Skip to content

Commit

Permalink
Debug: Filter the contents array to check for an empty file.
Browse files Browse the repository at this point in the history
  • Loading branch information
costdev committed Jan 8, 2025
1 parent 3aa9218 commit 746f364
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/class-debug.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public static function read( $limit = 1000 ) {

$file_content = $wp_filesystem->get_contents_array( $file_path, $limit, true );

if ( ( false === $file_content ) || ( 0 === count( $file_content ) ) ) {
if ( ( false === $file_content ) || ( 0 === count( array_filter( $file_content ) ) ) ) {
$file_content = [ esc_html__( '*****Log file is empty.*****', 'aspireupdate' ) ];
}

Expand Down

0 comments on commit 746f364

Please sign in to comment.