crowdfavorite/wp-post-formats — pull request #45 by QWp6t (2014-01-13 04:52:33+00:00)
Title: Fixes "creating default object from empty value" warning.

Resolves the following PHP warning message:
> **Warning:** Creating default object from empty value

This warning was caused because `$post` had not been set, i.e., it was null.

If we don't like `get_post($post_id)`, then the following workaround would also get rid of the warning:

$post = is_object($post)?$post:new stdClass();
$post->ID = $post_id;

You would insert that near [L199](https://github.com/crowdfavorite/wp-post-formats/blob/develop/cf-post-formats.php#L199).