Title: Error-Message: Undefined variable
Last modified: April 25, 2019

---

# Error-Message: Undefined variable

 *  Resolved [Bianca](https://wordpress.org/support/users/biancabuergerdf18/)
 * (@biancabuergerdf18)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/error-message-undefined-variable/)
 * Hi
 * I’ve got a multisite and the plugin runs at all subpages.
 * The error-message is:
    Notice: compact(): Undefined variable: in /www/htdocs/
   xxxxx/wp-content/plugins/post-snippets/src/PostSnippets/Shortcode.php on line
   38
 * I don’t know, what to do now 🙁
 * Thanks
    Bianca
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-message-undefined-variable%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Thread Starter [Bianca](https://wordpress.org/support/users/biancabuergerdf18/)
 * (@biancabuergerdf18)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/error-message-undefined-variable/#post-11471768)
 * I had to change the link, but I’ve got another one 😉
 * It’s really a problem!!
 * [Link to a blog-post](https://sportfotografie.bianca-buerger.de/2013/01/sportstaette-sporthalle-albert-schweitzer-platz-aso-dome-berlin/)
    -  This reply was modified 7 years, 1 month ago by [Bianca](https://wordpress.org/support/users/biancabuergerdf18/).
 *  [Diego](https://wordpress.org/support/users/greentreelabs/)
 * (@greentreelabs)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/error-message-undefined-variable/#post-11473227)
 * Hi,
 * I’m checking the issue, in the while you should set WP_DEBUG to false in your
   wp-config.php so that kind of message won’t be shown in a production site.
 * Diego
 *  [Diego](https://wordpress.org/support/users/greentreelabs/)
 * (@greentreelabs)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/error-message-undefined-variable/#post-11473270)
 * I checked it but it seems all correct actually. Can you show me the snippet?
 *  Thread Starter [Bianca](https://wordpress.org/support/users/biancabuergerdf18/)
 * (@biancabuergerdf18)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/error-message-undefined-variable/#post-11473895)
 * Thanks for checking, Diego
 * I took a [sreenshot](https://www.screencast.com/t/Lmdg22jX)
 * I don’t have snippets for changing the layout or so. It’s only text I’d like 
   to insert…like a list of locations or blog-posts. Nothing special, I think 😉
 *  [Maciej Ma?kowiak](https://wordpress.org/support/users/maciejmackowiak/)
 * (@maciejmackowiak)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/error-message-undefined-variable/#post-11652188)
 * i’ve got the same errornotice
    and i think it is related to php 7.3 [https://www.php.net/manual/en/function.compact.php](https://www.php.net/manual/en/function.compact.php)
 * Changelog
    Version Description 7.3.0 compact() now issues an E_NOTICE level error
   if a given string refers to an unset variable. Formerly, such strings have been
   silently skipped.
 *  [archon810](https://wordpress.org/support/users/archon810/)
 * (@archon810)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/error-message-undefined-variable/#post-11654003)
 * Same issue on our end.
 * Cross-linking to github issue as one is open there too [https://github.com/GreenTreeLabs/post-snippets/issues/97](https://github.com/GreenTreeLabs/post-snippets/issues/97).
 *  [archon810](https://wordpress.org/support/users/archon810/)
 * (@archon810)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/error-message-undefined-variable/#post-11683041)
 * [@greentreelabs](https://wordpress.org/support/users/greentreelabs/) Any updates
   on this?
 * Thanks.
 *  [Diego](https://wordpress.org/support/users/greentreelabs/)
 * (@greentreelabs)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/error-message-undefined-variable/#post-11687659)
 * Hi, I’m preparing the fix, will be published today!
 *  [Maciej Ma?kowiak](https://wordpress.org/support/users/maciejmackowiak/)
 * (@maciejmackowiak)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/error-message-undefined-variable/#post-11690540)
 * perfect 🙂
 *  Thread Starter [Bianca](https://wordpress.org/support/users/biancabuergerdf18/)
 * (@biancabuergerdf18)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/error-message-undefined-variable/#post-11690546)
 * Thanks a lot!!
 *  [Diego](https://wordpress.org/support/users/greentreelabs/)
 * (@greentreelabs)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/error-message-undefined-variable/#post-11691438)
 * Hi please update to 3.0.10
 *  [archon810](https://wordpress.org/support/users/archon810/)
 * (@archon810)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/error-message-undefined-variable/#post-11694198)
 * Thanks, the fix worked.

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

The topic ‘Error-Message: Undefined variable’ is closed to new replies.

 * ![](https://ps.w.org/post-snippets/assets/icon-128x128.gif?rev=2545587)
 * [Post Snippets - Custom WordPress Code Snippets Customizer](https://wordpress.org/plugins/post-snippets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-snippets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-snippets/)
 * [Active Topics](https://wordpress.org/support/plugin/post-snippets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-snippets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-snippets/reviews/)

 * 12 replies
 * 4 participants
 * Last reply from: [archon810](https://wordpress.org/support/users/archon810/)
 * Last activity: [6 years, 11 months ago](https://wordpress.org/support/topic/error-message-undefined-variable/#post-11694198)
 * Status: resolved