I’ve fixed some errors that I was experiencing with version 2.0 (dated 2007-02-02) of the Sociable WordPress plugin by Peter Harkins. Specifically, when running WordPress 2.2+, I would get the following warnings when saving changes:
Warning: implode() [function.implode]: Bad arguments. in PATHwp-contentpluginssociablesociable.php on line 651 Warning: Invalid argument supplied for foreach() in PATHwp-contentpluginssociablesociable.php on line 762
For each button, I’d get another error:
Warning: in_array() [function.in-array]: Wrong datatype for second argument in PATHwp-contentpluginssociablesociable.php on line 797
I think I’ve narrowed the cause down to the way the plugin was writing the newly selected options to the database.
In addition to fixing those warnings, I also corrected a few behaviors:
- The StumbleUpon button didn’t send the URL to the correct address at http://www.stumbleupon.com/. The button now works correctly, and also sends the page’s title.
- In Options -> Sociable, leaving the field for “text displayed in front of the icons” blank now results in no extraneous code being inserted into the page. Leaving the field blank also eliminates the popup “These icons link to social bookmarking sites…” text.
- The links to the social networking sites are now all