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

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>