Title: Errors when plugin is active
Last modified: August 21, 2016

---

# Errors when plugin is active

 *  Resolved [awmax99](https://wordpress.org/support/users/awmax99/)
 * (@awmax99)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/errors-when-plugin-is-active-1/)
 * I recently downloaded and installed CPT-onomies. I think it will work perfect
   for my needs. The problem is I can’t get it to work and it displays 5 error messages
   when it’s active.
 * Strict Standards: Redefining already defined constructor for class CPT_TAXONOMY
   in D:\WebSites\wp1\wp-content\plugins\cpt-onomies\cpt-onomy.php on line 20
 * Strict Standards: Redefining already defined constructor for class CPT_ONOMIES_MANAGER
   in D:\WebSites\wp1\wp-content\plugins\cpt-onomies\manager.php on line 29
 * Strict Standards: Redefining already defined constructor for class CPT_ONOMIES_ADMIN
   in D:\WebSites\wp1\wp-content\plugins\cpt-onomies\admin.php on line 29
 * Strict Standards: Declaration of CPTonomy_Walker_Terms_Checklist::start_el() 
   should be compatible with Walker::start_el(&$output, $object, $depth = 0, $args
   = Array, $current_object_id = 0) in D:\WebSites\wp1\wp-content\plugins\cpt-onomies\
   admin.php on line 1196
 * Strict Standards: Redefining already defined constructor for class CPT_ONOMIES_ADMIN_SETTINGS
   in D:\WebSites\wp1\wp-content\plugins\cpt-onomies\admin-settings.php on line 
   30
 * Any help to resolve these would be appreciated.
 * Thank you!
 * [http://wordpress.org/plugins/cpt-onomies/](http://wordpress.org/plugins/cpt-onomies/)

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

 *  [Rachel Cherry](https://wordpress.org/support/users/bamadesigner/)
 * (@bamadesigner)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/errors-when-plugin-is-active-1/#post-4001988)
 * From what I could figure out via Google-fu, this seems to be a PHP class issue
   with PHP5.
 * It looks like the fix is to make sure the PHP5 constructor is BEFORE the PHP4
   constructor. In other words, in the cpt-onomy.php file, which holds the CPT_onomy
   class, this:
 *     ```
       public function CPT_TAXONOMY() { $this->__construct(); }
       public function __construct() {
          // function filters
          add_filter( 'get_terms', array( &$this, 'get_terms' ), 1, 3 );
          add_filter( 'wp_get_object_terms', array( &$this, 'wp_get_object_terms' ), 1, 4 );
          // other filters
          add_filter( 'get_terms_args', array( &$this, 'adjust_get_terms_args' ), 1, 2 );
       }
       ```
   
 * needs to be this:
 *     ```
       public function __construct() {
          // function filters
          add_filter( 'get_terms', array( &$this, 'get_terms' ), 1, 3 );
          add_filter( 'wp_get_object_terms', array( &$this, 'wp_get_object_terms' ), 1, 4 );
          // other filters
          add_filter( 'get_terms_args', array( &$this, 'adjust_get_terms_args' ), 1, 2 );
       }
       public function CPT_TAXONOMY() { $this->__construct(); }
       ```
   
 * `__construct()` is the PHP5 way of doing things while `CPT_TAXONOMY()`, i.e a
   function with the name of the class, is the PHP4 method.
 * I’ve updated my code for the next update but a quick fix would be to go switch
   these lines wherever you see the class issue.
 * Hope this helps! Thanks!
 *  Thread Starter [awmax99](https://wordpress.org/support/users/awmax99/)
 * (@awmax99)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/errors-when-plugin-is-active-1/#post-4001991)
 * That fixed everything except:
 * Strict Standards: Declaration of CPTonomy_Walker_Terms_Checklist::start_el() 
   should be compatible with Walker::start_el(&$output, $object, $depth = 0, $args
   = Array, $current_object_id = 0) in D:\WebSites\wp1\wp-content\plugins\cpt-onomies\
   admin.php on line 1196
 * Thanks again!
    Al
 *  [Rachel Cherry](https://wordpress.org/support/users/bamadesigner/)
 * (@bamadesigner)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/errors-when-plugin-is-active-1/#post-4002029)
 * Try replacing the function declaration for start_el() in the CPTonomy_Walker_Terms_Checklist
   class in the admin.php file with this:
 * `function start_el( &$output, $category, $depth = 0, $args = array(), $current_object_id
   = 0 ) {`
 *  Thread Starter [awmax99](https://wordpress.org/support/users/awmax99/)
 * (@awmax99)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/errors-when-plugin-is-active-1/#post-4002071)
 * I think that fixed it.
 * Thank you for the great support!
 *  [Rachel Cherry](https://wordpress.org/support/users/bamadesigner/)
 * (@bamadesigner)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/errors-when-plugin-is-active-1/#post-4002084)
 * You’re most welcome!

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

The topic ‘Errors when plugin is active’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/cpt-onomies_f2f2f2.svg)
 * [CPT-onomies: Using Custom Post Types as Taxonomies](https://wordpress.org/plugins/cpt-onomies/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cpt-onomies/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cpt-onomies/)
 * [Active Topics](https://wordpress.org/support/plugin/cpt-onomies/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cpt-onomies/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cpt-onomies/reviews/)

## Tags

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

 * 5 replies
 * 2 participants
 * Last reply from: [Rachel Cherry](https://wordpress.org/support/users/bamadesigner/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/errors-when-plugin-is-active-1/#post-4002084)
 * Status: resolved