As this https://www.joomlart.com/forums/d/39124-single-article-view-crash has been closed with no proper solution, it is not about the PHP version, it is the code itself that has a pretty obvious bug:
$size = @getimagesize($og_image);
if (!empty($size)) {
$document->setMetaData( 'og:image:width', $size[0] );
$document->setMetaData( 'og:image:height', $size[1] );
}
here you use the full article image as og:image
but you don't check if that actually exists.
Solution for other people that are experiencing the same issue, which is quite likely:
if (!empty($og_image)) {
$size = @getimagesize($og_image);
$document->setMetaData( 'og:image:width', $size[0] );
$document->setMetaData( 'og:image:height', $size[1] );
}