WP Statistics
[resolved] Conflict With Another Plugin : objectToArray (3 posts)

  1. X-Raym
    Posted 1 year ago #

    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

    How can I solve that ?

    Thanks :)
    and thanks you for your plugin :)


  2. Greg Ross
    Plugin Author

    Posted 1 year ago #

    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.

  3. X-Raym
    Posted 1 year ago #

    Perfect !!

    thank you a lot for your support :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Statistics
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic