• Would love to use this plugin with PHP 7 but I get 2 warnings checking the PHP compability :

    FILE: /wp-content/plugins/simple-facebook-plugin/lib/sfp-like-box.php
    —————————————————————————————
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    —————————————————————————————
    23 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
    —————————————————————————————

    FILE: /wp-content/plugins/simple-facebook-plugin/lib/sfp-page-plugin.php
    —————————————————————————————
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    —————————————————————————————
    24 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
    —————————————————————————————

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Mohamed Elamine

    (@mewebpro)

    I fixed it manually but I’d love to see it added to the plugin code to avoid the warnings for next release.
    1- /lib/sfp-like-box.php change “function SFPLikeBoxWidget()…” to

    function __construct(){
            $widget_ops = array( 'description' => 'Is deprecated by Facebook, please use the new Page Plugin instead. Like Box will automatically fall back to the Page Plugin by June 23rd 2015.' );
    		parent::WP_Widget( 'facebookwidget', $name = 'SFP - Like Box. Deprecated!',  $widget_ops);
        }
    	function SFPLikeBoxWidget() {
    		self::__construct();
    	}

    2- /lib/sfp-page-plugin.php change “function SFPPagePluginWidget()…” to

    function __construct(){
    		$widget_ops = array( 'description' => 'Display Facebook Page Plugin.' );
    		parent::WP_Widget( 'sfp_page_plugin_widget', $name = 'SFP - Facebook Page Plugin',  $widget_ops);
    	}
    	function SFPPagePluginWidget() {
    		self::__construct();
    	}
    Plugin Author topdevs.net

    (@topdevs)

    Thanks for the input Mohamed! This is fixed in v1.5

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘PHP 7 Warning’ is closed to new replies.