fixes after php8 upgrade
This commit is contained in:
parent
c786e5c5de
commit
c90a0ca8ea
@ -254,7 +254,7 @@ function setCompanyForUser($ID, $REQ, $replace = false)
|
|||||||
{
|
{
|
||||||
$another_user_companies = getCompaniesForUser($admin_to_remove_id, $existed_client_record['ID']);
|
$another_user_companies = getCompaniesForUser($admin_to_remove_id, $existed_client_record['ID']);
|
||||||
|
|
||||||
if(count($another_user_companies) === 0)
|
if(gettype($another_user_companies) === "array" && count($another_user_companies) === 0)
|
||||||
{
|
{
|
||||||
\CUser::Delete($admin_to_remove_id);
|
\CUser::Delete($admin_to_remove_id);
|
||||||
}
|
}
|
||||||
@ -1098,7 +1098,7 @@ switch($PARAM_1)
|
|||||||
{
|
{
|
||||||
$user_companies = getCompaniesForUser($removed_user_id);
|
$user_companies = getCompaniesForUser($removed_user_id);
|
||||||
|
|
||||||
if(count($user_companies) === 0)
|
if(gettype($user_companies) === "array" && count($user_companies) === 0)
|
||||||
{
|
{
|
||||||
\CUser::Delete($removed_user_id);
|
\CUser::Delete($removed_user_id);
|
||||||
}
|
}
|
||||||
@ -2449,7 +2449,7 @@ switch($PARAM_1)
|
|||||||
$questions_ar_res['PROPERTIES'] = $questions_ob_element->GetProperties();
|
$questions_ar_res['PROPERTIES'] = $questions_ob_element->GetProperties();
|
||||||
|
|
||||||
$templates = [];
|
$templates = [];
|
||||||
if(count($questions_ar_res['PROPERTIES']['TEMPLATE_FILE']['VALUE']) > 0)
|
if(gettype($questions_ar_res['PROPERTIES']['TEMPLATE_FILE']['VALUE']) === "array" && count($questions_ar_res['PROPERTIES']['TEMPLATE_FILE']['VALUE']) > 0)
|
||||||
{
|
{
|
||||||
foreach($questions_ar_res['PROPERTIES']['TEMPLATE_FILE']['VALUE'] AS $file_id)
|
foreach($questions_ar_res['PROPERTIES']['TEMPLATE_FILE']['VALUE'] AS $file_id)
|
||||||
{
|
{
|
||||||
@ -2474,7 +2474,7 @@ switch($PARAM_1)
|
|||||||
"title" => $questions_ar_res['NAME'],
|
"title" => $questions_ar_res['NAME'],
|
||||||
"answer" => $questions_ar_res['PREVIEW_TEXT'],
|
"answer" => $questions_ar_res['PREVIEW_TEXT'],
|
||||||
"request" => $questions_ar_res['PROPERTIES']['REQUEST']['VALUE_XML_ID'] == "YES" ? true : false,
|
"request" => $questions_ar_res['PROPERTIES']['REQUEST']['VALUE_XML_ID'] == "YES" ? true : false,
|
||||||
"templates" => count($templates) > 0 ? $templates : null,
|
"templates" => gettype($templates) === "array" && count($templates) > 0 ? $templates : null,
|
||||||
"documents" => $questions_ar_res['PROPERTIES']['DOCUMENTS']['~VALUE'] !== "" ? $questions_ar_res['PROPERTIES']['DOCUMENTS']['~VALUE']['TEXT'] : null,
|
"documents" => $questions_ar_res['PROPERTIES']['DOCUMENTS']['~VALUE'] !== "" ? $questions_ar_res['PROPERTIES']['DOCUMENTS']['~VALUE']['TEXT'] : null,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
/** @var CBitrixComponent $component */
|
/** @var CBitrixComponent $component */
|
||||||
$this->setFrameMode(true);
|
$this->setFrameMode(true);
|
||||||
?>
|
?>
|
||||||
<? if(count($arResult['LEADER']) > 0): ?>
|
<? if($arResult['LEADER'] !== null && count($arResult['LEADER']) > 0): ?>
|
||||||
<div class="container container_with_filter <?= $arParams['EXTENDED'] ? "container_with_filter_with_margin" : ""; ?>" style="width: 100%; padding-top: 0px; margin-left: 0px; margin-right: 0px;">
|
<div class="container container_with_filter <?= $arParams['EXTENDED'] ? "container_with_filter_with_margin" : ""; ?>" style="width: 100%; padding-top: 0px; margin-left: 0px; margin-right: 0px;">
|
||||||
<h2 style="margin-bottom: 24px;">Наша команда</h2>
|
<h2 style="margin-bottom: 24px;">Наша команда</h2>
|
||||||
<div class="person_comment">
|
<div class="person_comment">
|
||||||
|
|||||||
@ -56,7 +56,7 @@ $this->setFrameMode(true);
|
|||||||
</div>
|
</div>
|
||||||
<form id="form_vacancy">
|
<form id="form_vacancy">
|
||||||
<div id="form_vacancy_process">
|
<div id="form_vacancy_process">
|
||||||
<input type="hidden" name="FORM_FIELD_VACANCY_REGION" value="<?= implode(", ", $arParams['VACANCY_REGIONS']); ?>"/>
|
<input type="hidden" name="FORM_FIELD_VACANCY_REGION" value="<?= gettype($arParams['VACANCY_REGIONS']) === "array" ? implode(", ", $arParams['VACANCY_REGIONS']) : ""; ?>"/>
|
||||||
<div class="form_field" id="FORM_FIELD_FIO_wrapper">
|
<div class="form_field" id="FORM_FIELD_FIO_wrapper">
|
||||||
<input type="text" id="FORM_FIELD_FIO" name="FORM_FIELD_FIO" value="" placeholder="Фамилия, имя и отчество *"/>
|
<input type="text" id="FORM_FIELD_FIO" name="FORM_FIELD_FIO" value="" placeholder="Фамилия, имя и отчество *"/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -27,12 +27,12 @@ $this->setFrameMode(true);
|
|||||||
<h1 class="section_title"><?= $arResult['NAME']; ?></h1>
|
<h1 class="section_title"><?= $arResult['NAME']; ?></h1>
|
||||||
<div class="special_detail">
|
<div class="special_detail">
|
||||||
<div class="special_offer">
|
<div class="special_offer">
|
||||||
<?= $arResult['PROPERTIES']['CONTENT_HEADER']['~VALUE']['TEXT']; ?>
|
<?= isset($arResult['PROPERTIES']['CONTENT_HEADER']['~VALUE']['TEXT']) ? $arResult['PROPERTIES']['CONTENT_HEADER']['~VALUE']['TEXT'] : ""; ?>
|
||||||
<a href="#order" class="button button-blue">Отправить заявку</a>
|
<a href="#order" class="button button-blue">Отправить заявку</a>
|
||||||
<img src="<?= $arResult['DETAIL_PICTURE']; ?>" alt="<?= $arResult['NAME']; ?>" />
|
<img src="<?= $arResult['DETAIL_PICTURE']; ?>" alt="<?= $arResult['NAME']; ?>" />
|
||||||
</div>
|
</div>
|
||||||
<div class="special_offer-text">
|
<div class="special_offer-text">
|
||||||
<?= $arResult['PROPERTIES']['CONTENT_TOP']['~VALUE']['TEXT']; ?>
|
<?= isset($arResult['PROPERTIES']['CONTENT_TOP']['~VALUE']['TEXT']) ? $arResult['PROPERTIES']['CONTENT_TOP']['~VALUE']['TEXT'] : ""; ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="leasing_offer">
|
<div class="leasing_offer">
|
||||||
<? if(count($arResult['PROPERTIES']['CARS']['RELATED']) > 0): ?>
|
<? if(count($arResult['PROPERTIES']['CARS']['RELATED']) > 0): ?>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user