Title: Fix get_base_path() method
Last modified: August 31, 2016

---

# Fix get_base_path() method

 *  Resolved [balbuf](https://wordpress.org/support/users/balbuf/)
 * (@balbuf)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/fix-get_base_path-method/)
 * Hello!
 * Could you fix the `get_base_path()` method in `GFCPTAddon`? My error log is riddled
   with notices about this method being called statically when it is not declared
   as such. Meanwhile, the method uses the `WP_PLUGIN_DIR` constant instead of just
   relying on where the file is situated. This is an understandable assumption, 
   but some unconventional WordPress configurations may place plugins in a different
   directory than the default. Please consider updating the method as follows:
 * `
    protected static function get_base_path(){ return __DIR__; }
 * If you are concerned about supporting PHP <=5.2, you could replace `__DIR__` 
   with `dirname(__FILE__)`.
 * Thanks!
 * [https://wordpress.org/plugins/gravity-forms-custom-post-types/](https://wordpress.org/plugins/gravity-forms-custom-post-types/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Dave from Gravity Wiz](https://wordpress.org/support/users/spivurno/)
 * (@spivurno)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/fix-get_base_path-method/#post-7247759)
 * Hi balbuf,
 * What version of this plugin are you using? This issue was fixed in v3.1
 * I’ll implement your other suggestion in the next version. 🙂

Viewing 1 replies (of 1 total)

The topic ‘Fix get_base_path() method’ is closed to new replies.

 * ![](https://ps.w.org/gravity-forms-custom-post-types/assets/icon-256x256.png?
   rev=2542252)
 * [Gravity Forms + Custom Post Types](https://wordpress.org/plugins/gravity-forms-custom-post-types/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gravity-forms-custom-post-types/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gravity-forms-custom-post-types/)
 * [Active Topics](https://wordpress.org/support/plugin/gravity-forms-custom-post-types/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gravity-forms-custom-post-types/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gravity-forms-custom-post-types/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Dave from Gravity Wiz](https://wordpress.org/support/users/spivurno/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/fix-get_base_path-method/#post-7247759)
 * Status: resolved