Fixed the code.
below the corrected section of the file TinyPortal.php
// Ищем изображение в тексте страницы
$first_post_image = preg_match('/<img(.*)src(.*)=(.*)"(.*)"/U', $body, $value);
$settings['og_image'] = $first_post_image ? array_pop($value) : null;
if ($row['useintro'] && !empty($row['intro'])) {
$intro = $row['type'] == 'bbc' ? parse_bbc($row['intro'], false) : ($row['type'] == 'php' ? '<?php' . $row['intro'] : $row['intro']);
$intro = Subs::getTeaser($intro);
$intro = explode(' ', $intro)[0];
$intro = shorten_subject($intro, 130);
} else {
$body = Subs::getTeaser($body);
$body = str_replace($txt['quote'], '', $body);
$body = explode(' ', $body)[0];
$body = shorten_subject($body, 130);
}
// Если есть intro, используем в качестве описания его, иначе — выдержку из текста страницы
$context['meta_description'] = (isset($intro) ? $intro : $body);