From c90a0ca8eaaf63ce32276a0b084847d88ba90d29 Mon Sep 17 00:00:00 2001 From: merelendor Date: Wed, 8 Feb 2023 20:57:38 +0300 Subject: [PATCH] fixes after php8 upgrade --- api/index.php | 8 ++++---- .../catalog.city.team/templates/.default/template.php | 2 +- .../form.vacancy/templates/.default/template.php | 2 +- .../special.offers.offer/templates/.default/template.php | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/api/index.php b/api/index.php index aaea660..6ba8e81 100644 --- a/api/index.php +++ b/api/index.php @@ -254,7 +254,7 @@ function setCompanyForUser($ID, $REQ, $replace = false) { $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); } @@ -1098,7 +1098,7 @@ switch($PARAM_1) { $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); } @@ -2449,7 +2449,7 @@ switch($PARAM_1) $questions_ar_res['PROPERTIES'] = $questions_ob_element->GetProperties(); $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) { @@ -2474,7 +2474,7 @@ switch($PARAM_1) "title" => $questions_ar_res['NAME'], "answer" => $questions_ar_res['PREVIEW_TEXT'], "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, ]; diff --git a/local/components/evolution/catalog.city.team/templates/.default/template.php b/local/components/evolution/catalog.city.team/templates/.default/template.php index d3b8f38..6d149a1 100644 --- a/local/components/evolution/catalog.city.team/templates/.default/template.php +++ b/local/components/evolution/catalog.city.team/templates/.default/template.php @@ -12,7 +12,7 @@ /** @var CBitrixComponent $component */ $this->setFrameMode(true); ?> - 0): ?> + 0): ?>
" style="width: 100%; padding-top: 0px; margin-left: 0px; margin-right: 0px;">

Наша команда

diff --git a/local/components/evolution/form.vacancy/templates/.default/template.php b/local/components/evolution/form.vacancy/templates/.default/template.php index 305356c..0592458 100644 --- a/local/components/evolution/form.vacancy/templates/.default/template.php +++ b/local/components/evolution/form.vacancy/templates/.default/template.php @@ -56,7 +56,7 @@ $this->setFrameMode(true);
- "/> + "/>
diff --git a/local/components/evolution/special.offers.offer/templates/.default/template.php b/local/components/evolution/special.offers.offer/templates/.default/template.php index 0e24851..9475a32 100644 --- a/local/components/evolution/special.offers.offer/templates/.default/template.php +++ b/local/components/evolution/special.offers.offer/templates/.default/template.php @@ -27,12 +27,12 @@ $this->setFrameMode(true);