... if ($arResult["isFormErrors"] == "Y") { ob_start(); if ($arParams['USE_EXTENDED_ERRORS'] == 'N' || !is_array($arResult['FORM_ERRORS'])) ShowError($arResult["FORM_ERRORS"]); else ShowError(implode('<br />', $arResult["FORM_ERRORS"])); $arResult["FORM_ERRORS_TEXT"] = ob_get_contents(); ob_end_clean(); } ...