Skip to content
Browse files

Merge pull request #221 from Automattic/kraftbj-patch-1

Return false if there is no post global
  • Loading branch information...
2 parents 53c0201 + 2cedcfb commit 2244ce9dd00fbc0515e8e0e752b0d7e9230babf1 @philipjohn philipjohn committed
Showing with 3 additions and 0 deletions.
  1. +3 −0 liveblog.php
View
3 liveblog.php
@@ -378,6 +378,9 @@ public static function get_liveblog_state( $post_id = null ) {
}
if ( empty( $post_id ) ) {
global $post;
+ if ( ! $post ){
+ return false;
+ }
$post_id = $post->ID;
}
$state = get_post_meta( $post_id, self::key, true );

0 comments on commit 2244ce9

Please sign in to comment.
Something went wrong with that request. Please try again.