Simple Facebook Share Button
[resolved] PHP Notices: Undefined Index (3 posts)

  1. fireproofsocks
    Posted 3 years ago #

    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);


  2. Erick Hitter
    Code Wizard
    Plugin Author

    Posted 3 years ago #

    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.


  3. Erick Hitter
    Code Wizard
    Plugin Author

    Posted 2 years ago #

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


Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic