Skip to content

Commit

Permalink
Fixed an error on the stats page
Browse files Browse the repository at this point in the history
If the post id does not exist, continue through the loop
  • Loading branch information
jonathanbossenger committed May 25, 2018
1 parent 7ee960f commit c7d88d8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions includes/class-ssp-stats.php
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,10 @@ public function stats_page () {

$post = get_post( intval( $result->post_id ) );

if ( ! $post ) {
continue;
}

$sql = "SELECT `date` FROM $this->_table WHERE `post_id` = '".$result->post_id."'";

$episode_results = $wpdb->get_results( $sql );
Expand Down

0 comments on commit c7d88d8

Please sign in to comment.