<?php
if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) die();

$arResult['SECTION_ID'] = CIBlockFindTools::GetSectionID(
    $arResult['VARIABLES']['SECTION_ID'],
    $arResult['VARIABLES']['SECTION_CODE'],
    array(
        'IBLOCK_ID' => $arParams['IBLOCK_ID']
    )
);

$arResult['SECTION'] = [];
$ipropValues = new \Bitrix\Iblock\InheritedProperty\SectionValues(
    $arParams['IBLOCK_ID'],
    $arResult['SECTION_ID']
);
$arResult['SECTION']['SEO'] = $ipropValues->getValues(); // SEO данные раздела
$sectionResult = CIBlockSection::GetList(
    false,
    array(
        "IBLOCK_ID" => $arParams["IBLOCK_ID"],
        "ID" => $arResult["SECTION_ID"]
    ),
    false,
    array(
        'ID',
        'NAME',
        'PICTURE',
        'DESCRIPTION',
        'UF_*'
    )
);
while ($sectionProp = $sectionResult->Fetch()) {
    if (empty($sectionProp['DESCRIPTION'])) {
        $arResult['SECTION']['DESCRIPTION'] = $arResult['SECTION']['SEO']['SECTION_META_DESCRIPTION'];
    } else {
        $arResult['SECTION']['DESCRIPTION'] = $sectionProp['DESCRIPTION'];
    }
    $arResult['SECTION'][] = $sectionProp;
}