WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: Simple Facebook Connect] issues with Simple Tags (4 posts)

  1. Kazeneko
    Member
    Posted 4 years ago #

    Hello Everyone,

    I recently added Simple Facebook Connect to my site, and got it configured to work with Facebook easily. However, when I view any post, new or old, where the Facebook Connect button should be (under Facebook Publisher), I get the following:

    Warning: array_keys() [function.array-keys]: The first argument should be an array in /domainname/wp-content/plugins/simple-tags/inc/client.php on line 1310
    
    Warning: shuffle() expects parameter 1 to be array, null given in /domainname/wp-content/plugins/simple-tags/inc/client.php on line 1311
    
    Warning: Invalid argument supplied for foreach() in /domainname/wp-content/plugins/simple-tags/inc/client.php on line 1312

    Thankfully, the error shows exactly what is causing the issue... the Simple Tags plugin.

    Once I disable ST, SFC works perfectly! I reconfirmed that ST was causing the errors by disabling all other plugins except ST and SFC in WordPress. Oddly, it seems Simple Tags works fine even with the errors appearing?

    I've been using Simple Tags for well over a year with no problems. I checked for PHP errors with only ST activated, and SFC deactivated, then again with all my other plugins enabled except SFC, and found nothing.

    I need to continue using Simple Tags, and really want to be able to use SFC at the same, but I have no idea how to fix something like this.

    Anyone have any suggestions? And if more information is needed, let me know and I'll post asap.

    Thanks!

    http://wordpress.org/extend/plugins/simple-facebook-connect/

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 4 years ago #

    Edit the simple tags plugin, file inc/client.php.

    Around line 1309, you'll find this:

    function randomArray( &$array ) {
    	$keys = array_keys($array);
    	shuffle($keys);
    	foreach($keys as $key) {
    		$new[$key] = $array[$key];
    	}
    	$array = $new;
    	return true;
    }

    Change it to this:

    function randomArray( &$array ) {
    	if (!is_array($array)) return true;
    	$keys = array_keys($array);
    	shuffle($keys);
    	foreach($keys as $key) {
    		$new[$key] = $array[$key];
    	}
    	$array = $new;
    	return true;
    }

    Might fix it.

  3. Kazeneko
    Member
    Posted 4 years ago #

    This worked, awesome!

    Thank you for the fast response!

  4. Amaury Balmer
    Member
    Posted 4 years ago #

    Fixed on version 1.8.

Topic Closed

This topic has been closed to new replies.

About this Topic