Title: Undefined variable: pong
Last modified: August 31, 2016

---

# Undefined variable: pong

 *  Resolved [kitchin](https://wordpress.org/support/users/kitchin/)
 * (@kitchin)
 * [10 years ago](https://wordpress.org/support/topic/undefined-variable-pong/)
 * In 4.7 we get this warning:
    Notice: Undefined variable: pong in …/wp-content/
   plugins/xml-sitemap-feed/includes/class-xmlsitemapfeed.php on line 1188
 * Here is the fix at line 1188:
    v.4.7:
 *     ```
       if ( $pong = get_option( $this->prefix.'pong' ) && is_array($pong) ) {
       ```
   
 * patch:
 *     ```
       if ( $pong = get_option( $this->prefix.'pong' ) and is_array($pong) ) {
       ```
   
 * You could also clarify line 642, though it does work due to PHP’s lax syntax:
   
   v.4.7:
 *     ```
       if ( $post_type == 'page' && $id = get_option('page_on_front') ) {
       ```
   
 * patch:
 *     ```
       if ( $post_type == 'page' and $id = get_option('page_on_front') ) {
       ```
   
 * [https://wordpress.org/plugins/xml-sitemap-feed/](https://wordpress.org/plugins/xml-sitemap-feed/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Rolf Allard van Hagen](https://wordpress.org/support/users/ravanh/)
 * (@ravanh)
 * [10 years ago](https://wordpress.org/support/topic/undefined-variable-pong/#post-7353732)
 * Hi kitchin, you’re absolutely right… It’s the precedence that is at play here.
   I’ll fix this asap. Thanks for the feedback 🙂

Viewing 1 replies (of 1 total)

The topic ‘Undefined variable: pong’ is closed to new replies.

 * ![](https://ps.w.org/xml-sitemap-feed/assets/icon-128x128.png?rev=1112143)
 * [XML Sitemap & Google News](https://wordpress.org/plugins/xml-sitemap-feed/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/xml-sitemap-feed/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/xml-sitemap-feed/)
 * [Active Topics](https://wordpress.org/support/plugin/xml-sitemap-feed/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/xml-sitemap-feed/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/xml-sitemap-feed/reviews/)

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [Rolf Allard van Hagen](https://wordpress.org/support/users/ravanh/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/undefined-variable-pong/#post-7353732)
 * Status: resolved