WordPress.org

Support

Support » Plugins and Hacks » Simple Facebook Share Button » [Resolved] [Plugin: Simple Facebook Share Button] PHP Notices: Undefined Index

[Resolved] [Plugin: Simple Facebook Share Button] PHP Notices: Undefined Index

  • Using version 2.0.3 of your plugin, I’m getting some PHP notices — looks like you’re not checked whether array indexes are set before attempting to read from them:

    Notice: Undefined index: display in /path/to/site/wp-content/plugins/simple-facebook-share-button/simple_fb_share_button.php on line 57

    You could pass an array with keys as your default value to the get_option() function, and/or use isset() to determine if that index is defined in lines 57 and 58.

    I recommend adding this to your wp-config.php while developing:
    define('WP_DEBUG', true);

    http://wordpress.org/extend/plugins/simple-facebook-share-button/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Erick Hitter

    @ethitter

    This plugin being rather old, I wasn’t as assiduous in my error checking as I should have been. Given that Facebook has deprecated the Share API, I haven’t taken the time to update the plugin to resolve this problem or implement any feature requests. I may do so in the future, but I haven’t had the necessary time to do so in quite a while.

    Erick

    Plugin Author Erick Hitter

    @ethitter

    Version 2.0.4, released tonight, should resolve all notices output by this plugin.

    Erick

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] [Plugin: Simple Facebook Share Button] PHP Notices: Undefined Index’ is closed to new replies.
Skip to toolbar