Title: Conflict With Another Plugin : objectToArray
Last modified: August 21, 2016

---

# Conflict With Another Plugin : objectToArray

 *  Resolved [X-Raym](https://wordpress.org/support/users/x-raym/)
 * (@x-raym)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/conflict-with-another-plugin-objecttoarray/)
 * hi !
 * I want to report a conflict with a other plugin, conflict which deactivate the
   plugin. Here is the error message :
 *     ```
       Fatal error: Cannot redeclare objectToArray() (previously declared in /home/whatnotfee/www/wp-content/plugins/amr-users/includes/ameta-includes.php:409) in /home/whatnotfee/www/wp-content/plugins/wp-statistics/includes/functions/functions.php on line 630
       ```
   
 * and here is the plugin : [WordPress › amr users « WordPress Plugins](http://wordpress.org/plugins/amr-users/)
 * How can I solve that ?
 * Thanks 🙂
    and thanks you for your plugin 🙂
 * [https://wordpress.org/plugins/wp-statistics/](https://wordpress.org/plugins/wp-statistics/)

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

 *  Plugin Contributor [Greg Ross](https://wordpress.org/support/users/gregross/)
 * (@gregross)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/conflict-with-another-plugin-objecttoarray/#post-5146420)
 * Edit /home/whatnotfee/www/wp-content/plugins/wp-statistics/includes/functions/
   functions.php, on line 611-630 there should be a function declartation like this:
 *     ```
       function objectToArray($d) {
       		if (is_object($d)) {
       			// Gets the properties of the given object
       			// with get_object_vars function
       			$d = get_object_vars($d);
       		}
   
       		if (is_array($d)) {
       			/*
       			* Return array converted to object
       			* Using __FUNCTION__ (Magic constant)
       			* for recursive call
       			*/
       			return array_map(__FUNCTION__, $d);
       		}
       		else {
       			// Return array
       			return $d;
       		}
       	}
       ```
   
 * Delete it. It is no longer used in the plugin and will be removed in the next
   release.
 *  Thread Starter [X-Raym](https://wordpress.org/support/users/x-raym/)
 * (@x-raym)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/conflict-with-another-plugin-objecttoarray/#post-5146422)
 * Perfect !!
 * thank you a lot for your support 🙂

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

The topic ‘Conflict With Another Plugin : objectToArray’ is closed to new replies.

 * ![](https://ps.w.org/wp-statistics/assets/icon.svg?rev=3081064)
 * [WP Statistics – Simple, privacy-friendly Google Analytics alternative](https://wordpress.org/plugins/wp-statistics/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-statistics/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-statistics/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-statistics/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-statistics/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-statistics/reviews/)

## Tags

 * [conflict](https://wordpress.org/support/topic-tag/conflict/)
 * [declared](https://wordpress.org/support/topic-tag/declared/)
 * [function](https://wordpress.org/support/topic-tag/function/)

 * 2 replies
 * 2 participants
 * Last reply from: [X-Raym](https://wordpress.org/support/users/x-raym/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/conflict-with-another-plugin-objecttoarray/#post-5146422)
 * Status: resolved