Title: Fatal error: call to a member function
Last modified: August 22, 2016

---

# Fatal error: call to a member function

 *  Resolved [davemgraham](https://wordpress.org/support/users/davemgraham/)
 * (@davemgraham)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-call-to-a-member-function-5/)
 * Hey guys,
 * I’ve recently upgraded to 1.2.1 and have noticed following error,
 *     ```
       Fatal error: Call to a member function has_attachments() on a non-object in
       /home/XXXX/public_html/XXXXX/wp-content/plugins/foogallery/includes/public/class-foogallery-template-loader.php on line 41
       ```
   
 * on [this site](http://bit.ly/1yUNYFJ).
 * Any ideas ?
 * [https://wordpress.org/plugins/foogallery/](https://wordpress.org/plugins/foogallery/)

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

 *  Thread Starter [davemgraham](https://wordpress.org/support/users/davemgraham/)
 * (@davemgraham)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-call-to-a-member-function-5/#post-5736953)
 * My bad. I had accidentally deleted the gallery, and my widget was still referring
   to it.
 *  Plugin Author [bradvin](https://wordpress.org/support/users/bradvin/)
 * (@bradvin)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-call-to-a-member-function-5/#post-5737068)
 * Hey Dave,
 * I will add in some extra checks for when galleries are deleted – it should fail
   gracefully.

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

The topic ‘Fatal error: call to a member function’ is closed to new replies.

 * ![](https://ps.w.org/foogallery/assets/icon-256x256.gif?rev=2602542)
 * [Gallery by FooGallery](https://wordpress.org/plugins/foogallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/foogallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/foogallery/)
 * [Active Topics](https://wordpress.org/support/plugin/foogallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/foogallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/foogallery/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [bradvin](https://wordpress.org/support/users/bradvin/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-call-to-a-member-function-5/#post-5737068)
 * Status: resolved