Title: error on unused variable
Last modified: July 30, 2018

---

# error on unused variable

 *  [scsedel](https://wordpress.org/support/users/scsedel/)
 * (@scsedel)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/error-on-unused-variable/)
 * Hi,
 * in dkpdf-functions.php at line 38 you set
 * `$post_type = get_post_type( $post->ID );`
 * but you’ll never use it. Unfortunately it generates an exception and break some
   plugin like Advanced Woo Search. Anyway… I’ve just commented this line and it
   solves the issue. Please have a look on that. Thank you!

The topic ‘error on unused variable’ is closed to new replies.

 * ![](https://ps.w.org/dk-pdf/assets/icon-256x256.png?rev=3396282)
 * [DK PDF - WordPress PDF Generator](https://wordpress.org/plugins/dk-pdf/)
 * [Support Threads](https://wordpress.org/support/plugin/dk-pdf/)
 * [Active Topics](https://wordpress.org/support/plugin/dk-pdf/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/dk-pdf/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/dk-pdf/reviews/)

## Tags

 * [php-error](https://wordpress.org/support/topic-tag/php-error/)

 * 0 replies
 * 1 participant
 * Last reply from: [scsedel](https://wordpress.org/support/users/scsedel/)
 * Last activity: [7 years, 10 months ago](https://wordpress.org/support/topic/error-on-unused-variable/)
 * Status: not resolved