Title: Getting a PHP error
Last modified: August 22, 2016

---

# Getting a PHP error

 *  [jamminjames](https://wordpress.org/support/users/jamminjames/)
 * (@jamminjames)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/getting-a-php-error-1/)
 * Anyone know how to deal with this?
 * PHP Notice: Undefined variable: useragent in /home/humortimes/public_html/wp-
   content/plugins/photoswipe-for-nextgen-gallery/ngg-photoswipe.php on line 31
 * I’m also getting:
    We’re sorry, but your theme’s page template didn’t make a 
   call to wp_footer(), which is required by NextGEN Gallery. Please add this call
   to your page templates.
 * I’m pretty sure this error notice was injected by ngg-photoswipe, although it
   doesn’t say. However, the theme I’m using (Suffusion), uses get_footer();
 * From what I’ve read, the wp_footer() template tag is part of the WordPress Hooks
   API, and is used primarily by Plugins, to inject scripts in the site HTML footer.
   So, if it’s used by plugins, why doesn’t NextGEN use it, instead of expecting
   the theme to?
 * Thanks!
 * [https://wordpress.org/plugins/photoswipe-for-nextgen-gallery/](https://wordpress.org/plugins/photoswipe-for-nextgen-gallery/)

The topic ‘Getting a PHP error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/photoswipe-for-nextgen-gallery.svg)
 * [Photoswipe for NextGEN Gallery](https://wordpress.org/plugins/photoswipe-for-nextgen-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/photoswipe-for-nextgen-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/photoswipe-for-nextgen-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/photoswipe-for-nextgen-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/photoswipe-for-nextgen-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/photoswipe-for-nextgen-gallery/reviews/)

## Tags

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

 * 0 replies
 * 1 participant
 * Last reply from: [jamminjames](https://wordpress.org/support/users/jamminjames/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/getting-a-php-error-1/)
 * Status: not resolved