Breaking your WordPress.

Problem: After adding Plugin “Share to Facebook”, the entire site crashes. Works ok in PHP 5.5 but not 7.

Fatal error: ‘break’ not in the ‘loop’ or ‘switch’ context in 

like-box.php on line 84

Change break to return Like so:


try {
$page_info = Facebook_WP_Extend::graph_api_with_app_access_token( '/fql', 'GET', array( 'q' => 'SELECT page_url FROM page WHERE ' . $where ) );
} catch ( WP_FacebookApiException $e ) {
Share on Facebook