Title: WordPress Default Featured Image | Undefined variable: post_type
Last modified: September 14, 2018

---

# WordPress Default Featured Image | Undefined variable: post_type

 *  Resolved [Nadir Atmaca](https://wordpress.org/support/users/nadiratmaca/)
 * (@nadiratmaca)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/wordpress-default-featured-image-undefined-variable-post_type/)
 * Hi.
    WordPress Default Featured Image plugin Php Undefined variable message :
 * `Notice: Undefined variable: post_type in /xxxxxx/wp-content/plugins/wp-auto-
   featured-image/wp-auto-featured-image.php on line 272`
 * Bug Fix line
    line 264 | `extract($_POST);` …change to … line 264 | `$_POST ?
   extract($_POST): extract($_GET) ;/** Bug Fix | Nadir Atmaca **/`

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Sanny Srivastava](https://wordpress.org/support/users/sanny_rss/)
 * (@sanny_rss)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/wordpress-default-featured-image-undefined-variable-post_type/#post-10687487)
 * Hi,
 * Thanks for pointing this out, source code is updated.
 * Thanks
 *  Thread Starter [Nadir Atmaca](https://wordpress.org/support/users/nadiratmaca/)
 * (@nadiratmaca)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/wordpress-default-featured-image-undefined-variable-post_type/#post-10688023)
 * Hi.
    I thank you. For making a nice and useful add-on. Another little fix I noticed.
 * `$_POST ? extract($_POST): $_GET ? <strong>extract($_GET) : $post_type=null;</
   strong>`
 * Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘WordPress Default Featured Image | Undefined variable: post_type’ is 
closed to new replies.

 * ![](https://ps.w.org/wp-auto-featured-image/assets/icon-256x256.jpg?rev=3445965)
 * [SNY Auto Featured Image](https://wordpress.org/plugins/wp-auto-featured-image/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-auto-featured-image/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-auto-featured-image/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-auto-featured-image/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-auto-featured-image/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-auto-featured-image/reviews/)

## Tags

 * [feature](https://wordpress.org/support/topic-tag/feature/)
 * [image](https://wordpress.org/support/topic-tag/image/)
 * [undefined](https://wordpress.org/support/topic-tag/undefined/)

 * 2 replies
 * 2 participants
 * Last reply from: [Nadir Atmaca](https://wordpress.org/support/users/nadiratmaca/)
 * Last activity: [7 years, 8 months ago](https://wordpress.org/support/topic/wordpress-default-featured-image-undefined-variable-post_type/#post-10688023)
 * Status: resolved