diff --git a/src/wp-includes/post-formats.php b/src/wp-includes/post-formats.php
index eb6fef0380..4c27ab6e5b 100644
--- a/src/wp-includes/post-formats.php
+++ b/src/wp-includes/post-formats.php
@@ -15,7 +15,8 @@
  * @return string|false The format if successful. False otherwise.
  */
 function get_post_format( $post = null ) {
-	if ( ! $post = get_post( $post ) ) {
+	$post = get_post( $post );
+	if ( ! $post ) {
 		return false;
 	}
 
