WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. X-Raym
    Member
    Posted 1 month 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 :)

    https://wordpress.org/plugins/wp-statistics/

  2. Greg Ross
    Member
    Plugin Author

    Posted 1 month 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
    Member
    Posted 1 month ago #

    Perfect !!

    thank you a lot for your support :)

Reply

You must log in to post.

About this Plugin

About this Topic