breiti/ajax-thumbnail-rebuild — pull request #9 by RistoNiinemets (2014-04-15 10:42:54+00:00)
Title: fix issue in media library

As I could not set post thumbnail anymore, I looked at the WP_DEBUG_LOG file, which stated:
```[15-Apr-2014 10:30:04 UTC] PHP Notice: Trying to get property of non-object in /var/www/work/imatra/wp-content/plugins/ajax-thumbnail-rebuild/ajax-thumbnail-rebuild.php on line 66```

Fix was quite simple. You are using `global $post`, but it is not necessary, as the filter passes $post to your function as second parameter.