Error
Call to a member function getGeoData() on null Error thrown with message "Call to a member function getGeoData() on null" Stacktrace: #11 Error in /home/bitrix/www/local/components/firstbit/regions.list/class.php:69 #10 RegionsListComponent:getUserCity in /home/bitrix/www/local/components/firstbit/regions.list/class.php:85 #9 RegionsListComponent:setUserCity in /home/bitrix/www/local/components/firstbit/regions.list/class.php:197 #8 RegionsListComponent:executeComponent in /home/bitrix/www/bitrix/modules/main/classes/general/component.php:660 #7 CBitrixComponent:includeComponent in /home/bitrix/www/bitrix/modules/main/classes/general/main.php:1072 #6 CAllMain:IncludeComponent in /home/bitrix/www/local/templates/1bitcloud/header.php:302 #5 include_once in /home/bitrix/www/bitrix/modules/main/include/prolog_after.php:120 #4 require in /home/bitrix/www/bitrix/modules/main/include/prolog.php:11 #3 require_once in /home/bitrix/www/bitrix/header.php:1 #2 require in /home/bitrix/www/blog/index.php:2 #1 include_once in /home/bitrix/www/bitrix/modules/main/include/urlrewrite.php:184 #0 include_once in /home/bitrix/www/bitrix/urlrewrite.php:2
Stack frames (12)
11
Error
/home/bitrix/www/local/components/firstbit/regions.list/class.php69
10
RegionsListComponent getUserCity
/home/bitrix/www/local/components/firstbit/regions.list/class.php85
9
RegionsListComponent setUserCity
/home/bitrix/www/local/components/firstbit/regions.list/class.php197
8
RegionsListComponent executeComponent
/home/bitrix/www/bitrix/modules/main/classes/general/component.php660
7
CBitrixComponent includeComponent
/home/bitrix/www/bitrix/modules/main/classes/general/main.php1072
6
CAllMain IncludeComponent
/home/bitrix/www/local/templates/1bitcloud/header.php302
5
include_once
/home/bitrix/www/bitrix/modules/main/include/prolog_after.php120
4
require
/home/bitrix/www/bitrix/modules/main/include/prolog.php11
3
require_once
/home/bitrix/www/bitrix/header.php1
2
require
/home/bitrix/www/blog/index.php2
1
include_once
/home/bitrix/www/bitrix/modules/main/include/urlrewrite.php184
0
include_once
/home/bitrix/www/bitrix/urlrewrite.php2
/home/bitrix/www/local/components/firstbit/regions.list/class.php
    /**
     * подготавливает входные параметры
     * @param array $arParams
     * @return array
     */
    public function onPrepareComponentParams($params)
    {
        $result = array(
            'CACHE_TIME' => intval($params['CACHE_TIME']) > 0 ? intval($params['CACHE_TIME']) : 86400,
        );
        return $result;
    }
 
    protected function getUserCity(){
        $cookieRegion=unserialize($this->request->getCookie("DomainInfo"));
        if(empty($cookieRegion)) {
            $ipAddress = GeoIp\Manager::getRealIp();
 
            $geoIpData = \Bitrix\Main\Service\GeoIp\Manager::getDataResult($ipAddress, LANGUAGE_ID);
            $cityName = $geoIpData->getGeoData()->cityName;
            if (empty($cityName)) {
                $cityName = 'Москва';
            }
        }else{
            $cityName=$cookieRegion['UF_NAME'];
        }
        return $cityName;
    }
 
    protected function setUserCity(){
 
 
            if(!empty($this->request->get('setCity'))){
                $cityName=$this->request->get('setCity');
            }else {
                $cityName = $this->getUserCity();
            }
            foreach ($this->arResult['REGIONS'] as $region){
                if ($region['UF_NAME']==$cityName){
                    $curCity=$region;
Arguments
  1. "Call to a member function getGeoData() on null"
    
/home/bitrix/www/local/components/firstbit/regions.list/class.php
            $ipAddress = GeoIp\Manager::getRealIp();
 
            $geoIpData = \Bitrix\Main\Service\GeoIp\Manager::getDataResult($ipAddress, LANGUAGE_ID);
            $cityName = $geoIpData->getGeoData()->cityName;
            if (empty($cityName)) {
                $cityName = 'Москва';
            }
        }else{
            $cityName=$cookieRegion['UF_NAME'];
        }
        return $cityName;
    }
 
    protected function setUserCity(){
 
 
            if(!empty($this->request->get('setCity'))){
                $cityName=$this->request->get('setCity');
            }else {
                $cityName = $this->getUserCity();
            }
            foreach ($this->arResult['REGIONS'] as $region){
                if ($region['UF_NAME']==$cityName){
                    $curCity=$region;
                }
                if ($region['UF_MAIN']=='Y'){
                    $mainDomain=$region;
                }
            }
            if(empty($curCity)){
                $curCity=$mainDomain;
            }
            $cookie = new \Bitrix\Main\Web\Cookie("DomainInfo", serialize($curCity), time()+86400*30);
            $this->arResult["CURRENT_REGION"]=$curCity;
            $GLOBALS["CURRENT_CITY"] = $curCity;
            $this->context->getResponse()->addCookie($cookie);
 
            if ($this->arParams['AJAX'] == 'Y')
                $this->context->getResponse()->flush( "" );
 
/home/bitrix/www/local/components/firstbit/regions.list/class.php
    protected function getResult()
    {
 
        $this->arResult['REGIONS'] = $this->getRegionsList();
        $this->arResult['SORTED_REGIONS'] = $this->sortRegions($this->arResult['REGIONS']);
 
    }
 
    /**
     * выполняет логику работы компонента
     */
    public function executeComponent()
    {
        global $APPLICATION;
        $this->checkModules();
        $this->setContext();
        if ($this->arParams['AJAX'] == 'Y')
            $APPLICATION->RestartBuffer();
        $this->getResult();
        $this->setUserCity();
        $this->includeComponentTemplate();
 
 
        if ($this->arParams['AJAX'] == 'Y')
            die();
 
        return $this->returned;
 
    }
}
 
?>
/home/bitrix/www/bitrix/modules/main/classes/general/component.php
            $keysToExport = $component->listKeysSignedParameters();
            if($keysToExport)
            {
                $component->storeSignedParameters(array_intersect_key($arParams, array_combine($keysToExport, $keysToExport)));
            }
 
            $component->arParams = $component->onPrepareComponentParams($arParams);
            $component->__prepareComponentParams($component->arParams);
 
            $componentFrame = new \Bitrix\Main\Composite\Internals\AutomaticArea($component);
            $componentFrame->start();
 
            if($returnResult)
            {
                $component->executeComponent();
                $result = $component->arResult;
            }
            else
            {
                $result = $component->executeComponent();
            }
 
            $this->__arIncludeAreaIcons = $component->__arIncludeAreaIcons;
            $frameMode = $component->getFrameMode();
 
            $componentFrame->end();
        }
        else
        {
            $this->includeComponentLang();
            $this->__prepareComponentParams($arParams);
            $this->arParams = $arParams;
 
            $componentFrame = new \Bitrix\Main\Composite\Internals\AutomaticArea($this);
            $componentFrame->start();
 
            if($returnResult)
            {
                $this->__IncludeComponent();
                $result = $this->arResult;
/home/bitrix/www/bitrix/modules/main/classes/general/main.php
 
        $bDrawIcons = ((!isset($arFunctionParams["HIDE_ICONS"]) || $arFunctionParams["HIDE_ICONS"] <> "Y") && $APPLICATION->GetShowIncludeAreas());
 
        if($bDrawIcons)
            echo $this->IncludeStringBefore();
 
        $result = null;
        $bComponentEnabled = (!isset($arFunctionParams["ACTIVE_COMPONENT"]) || $arFunctionParams["ACTIVE_COMPONENT"] <> "N");
 
        $component = new CBitrixComponent();
        if($component->InitComponent($componentName))
        {
            $obAjax = null;
            if($bComponentEnabled)
            {
                if(($arParams['AJAX_MODE'] ?? '') == 'Y')
                    $obAjax = new CComponentAjax($componentName, $componentTemplate, $arParams, $parentComponent);
 
                $this->__componentStack[] = $component;
                $result = $component->IncludeComponent($componentTemplate, $arParams, $parentComponent, $returnResult);
 
                array_pop($this->__componentStack);
            }
 
            if($bDrawIcons)
            {
                $panel = new CComponentPanel($component, $componentName, $componentTemplate, $parentComponent, $bComponentEnabled);
                $arIcons = $panel->GetIcons();
 
                echo $s = $this->IncludeStringAfter($arIcons["icons"], $arIcons["parameters"]);
            }
 
            if($bComponentEnabled && $obAjax)
            {
                $obAjax->Process();
            }
        }
 
        if($bShowDebug)
            echo $debug->Output($componentName, "/bitrix/components".$componentRelativePath."/component.php", ($arParams["CACHE_TYPE"] ?? '') . ($arParams["MENU_CACHE_TYPE"] ?? ''));
Arguments
  1. ""
    
  2. array:1 [
      "CACHE_TYPE" => "A"
    ]
    
  3. null
    
  4. false
    
/home/bitrix/www/local/templates/1bitcloud/header.php
} elseif (SITE_ID == 's2') {
    $poopupPath = '/en/';
}
?>
<?/*<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-TDJPLZP"
                  height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->*/?>
<div class="site">
    <div class="top_header">
        <div class="top_header_wr">
            <div class="top_header_col1">
                <div class="logo-1bit"><img
                            src="<?=SITE_TEMPLATE_PATH ?>/images/logo-1bit.svg" alt="Первый Бит"></div>
            </div>
            <div class="top_header_col2">
                <? $APPLICATION->IncludeComponent(
                        "firstbit:regions.list",
                    '',
                    array()
                );?>
            </div>
        </div>
    </div>
 
    <div class="header
    <?php
        if (($APPLICATION->GetCurDir() == "/it-autsorsing/")||($APPLICATION->GetCurDir() == "/it-autsorsing/pc-service/")||($APPLICATION->GetCurDir() == "/it-autsorsing/obsluzhivanie-serverov/")||($APPLICATION->GetCurDir() == "/it-autsorsing/obsluzhivanie-orgtekhniki/")||($APPLICATION->GetCurDir() == "/it-autsorsing/migraciya-it/")||($APPLICATION->GetCurDir() == "/it-autsorsing/obsluzhivanie-servera-1c/")) {echo 'it';}
    ?>
    ">
        <div class="header__bg">
        <div class="header_wr">
 
            <a class="logo" href="/"></a>
 
            <? $APPLICATION->IncludeComponent(
                "bitrix:search.form",
                "custom",
                Array(
                    "USE_SUGGEST" => "N",
Arguments
  1. "firstbit:regions.list"
    
  2. ""
    
  3. []
    
/home/bitrix/www/bitrix/modules/main/include/prolog_after.php
    elseif (($siteClosed = getLocalPath("php_interface/include/site_closed.php", BX_PERSONAL_ROOT)) !== false)
    {
        include($_SERVER["DOCUMENT_ROOT"] . $siteClosed);
    }
    else
    {
        include($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/site_closed.php");
    }
    die();
}
 
$sPreviewFile = $_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/tmp/templates/__bx_preview/header.php";
if (defined("SITE_TEMPLATE_PREVIEW_MODE") && file_exists($sPreviewFile))
{
    include_once($sPreviewFile);
}
else
{
    \Bitrix\Main\Page\Asset::getInstance()->startTarget('TEMPLATE');
    include_once($_SERVER["DOCUMENT_ROOT"] . SITE_TEMPLATE_PATH . "/header.php");
    \Bitrix\Main\Page\Asset::getInstance()->startTarget('PAGE');
}
 
/* Draw edit menu for whole content */
global $BX_GLOBAL_AREA_EDIT_ICON;
$BX_GLOBAL_AREA_EDIT_ICON = false;
 
if ($APPLICATION->GetShowIncludeAreas())
{
    $aUserOpt = CUserOptions::GetOption("global", "settings", []);
    if ($aUserOpt["page_edit_control_enable"] != "N")
    {
        $documentRoot = CSite::GetSiteDocRoot(SITE_ID);
        if (isset($_SERVER["REAL_FILE_PATH"]) && $_SERVER["REAL_FILE_PATH"] != "")
        {
            $currentFilePath = $_SERVER["REAL_FILE_PATH"];
        }
        else
        {
            $currentFilePath = $APPLICATION->GetCurPage(true);
Arguments
  1. "/home/bitrix/www/local/templates/1bitcloud/header.php"
    
/home/bitrix/www/bitrix/modules/main/include/prolog.php
<?php
require_once(__DIR__ . "/../bx_root.php");
 
if (file_exists($_SERVER["DOCUMENT_ROOT"].BX_PERSONAL_ROOT."/html_pages/.enabled"))
{
    require_once(__DIR__ . "/../lib/composite/responder.php");
    Bitrix\Main\Composite\Responder::respond();
}
 
require_once(__DIR__ . "/prolog_before.php");
require($_SERVER["DOCUMENT_ROOT"].BX_ROOT."/modules/main/include/prolog_after.php");
 
Arguments
  1. "/home/bitrix/www/bitrix/modules/main/include/prolog_after.php"
    
/home/bitrix/www/bitrix/header.php
<?require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog.php");?>
Arguments
  1. "/home/bitrix/www/bitrix/modules/main/include/prolog.php"
    
/home/bitrix/www/blog/index.php
<?
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/header.php");
$APPLICATION->SetTitle("Блог");
$APPLICATION->SetPageProperty("description", "Блог сайта 1bitcloud.ru: полезные советы и подробные инструкции по работе с 1С в облаке.");
 
?><?$APPLICATION->IncludeComponent(
    "bitrix:news",
    "blog",
    Array(
        "ADD_ELEMENT_CHAIN" => "Y",
        "ADD_SECTIONS_CHAIN" => "N",
        "AJAX_MODE" => "N",
        "AJAX_OPTION_ADDITIONAL" => "",
        "AJAX_OPTION_HISTORY" => "N",
        "AJAX_OPTION_JUMP" => "N",
        "AJAX_OPTION_STYLE" => "Y",
        "ALSO_ITEMS_POSITION" => "side",
        "BLOG_TITLE" => "Комментарии",
        "BROWSER_TITLE" => "-",
        "CACHE_FILTER" => "Y",
        "CACHE_GROUPS" => "N",
        "CACHE_TIME" => "100000",
        "CACHE_TYPE" => "A",
        "CHECK_DATES" => "Y",
        "COLOR_NEW" => "3E74E6",
        "COLOR_OLD" => "C0C0C0",
        "COMMENTS_COUNT" => "10",
        "COMPOSITE_FRAME_MODE" => "A",
        "COMPOSITE_FRAME_TYPE" => "AUTO",
        "DETAIL_ACTIVE_DATE_FORMAT" => "j F Y G:i",
        "DETAIL_BLOG_EMAIL_NOTIFY" => "Y",
        "DETAIL_BLOG_URL" => "catalog_comments",
        "DETAIL_BLOG_USE" => "Y",
        "DETAIL_DISPLAY_BOTTOM_PAGER" => "Y",
        "DETAIL_DISPLAY_TOP_PAGER" => "N",
        "DETAIL_FB_APP_ID" => "",
        "DETAIL_FB_USE" => "Y",
        "DETAIL_FIELD_CODE" => array("TAGS","PREVIEW_TEXT","DETAIL_TEXT","DETAIL_PICTURE","DATE_ACTIVE_FROM","SHOW_COUNTER",""),
        "DETAIL_PAGER_SHOW_ALL" => "Y",
        "DETAIL_PAGER_TEMPLATE" => "",
Arguments
  1. "/home/bitrix/www/bitrix/header.php"
    
/home/bitrix/www/bitrix/modules/main/include/urlrewrite.php
 
            if (($urlTmp7 == "upload/" || ($urlTmp7 == "bitrix/" && mb_substr($urlTmp, 0, 16) != "bitrix/services/" && mb_substr($urlTmp, 0, 18) != "bitrix/groupdavphp")))
                continue;
 
            $ext = strtolower(GetFileExtension($url));
            if ($ext != "php")
                continue;
 
            // D7 response is not available here
            if(stristr(php_sapi_name(), "cgi") !== false && (!defined("BX_HTTP_STATUS") || BX_HTTP_STATUS == false))
            {
                header("Status: 200 OK");
            }
            else
            {
                header($_SERVER["SERVER_PROTOCOL"]." 200 OK");
            }
 
            $_SERVER["REAL_FILE_PATH"] = $url;
            include_once($io->GetPhysicalName($_SERVER['DOCUMENT_ROOT'].$url));
            die();
        }
    }
}
 
//admin section 404
if(mb_strpos($requestUri, "/bitrix/admin/") === 0)
{
    $_SERVER["REAL_FILE_PATH"] = "/bitrix/admin/404.php";
    include($_SERVER["DOCUMENT_ROOT"]."/bitrix/admin/404.php");
    die();
}
 
define("BX_CHECK_SHORT_URI", true);
 
Arguments
  1. "/home/bitrix/www/blog/index.php"
    
/home/bitrix/www/bitrix/urlrewrite.php
<?
include_once($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/include/urlrewrite.php');
if(file_exists($_SERVER['DOCUMENT_ROOT'].'/404.php'))
    include_once($_SERVER['DOCUMENT_ROOT'].'/404.php');
?>
Arguments
  1. "/home/bitrix/www/bitrix/modules/main/include/urlrewrite.php"
    

Environment & details:

empty
empty
empty
empty
Key Value
SESS_AUTH
array:1 [
  "POLICY" => array:18 [
    "SESSION_TIMEOUT" => 24
    "SESSION_IP_MASK" => "0.0.0.0"
    "MAX_STORE_NUM" => 10
    "STORE_IP_MASK" => "0.0.0.0"
    "STORE_TIMEOUT" => 525600
    "CHECKWORD_TIMEOUT" => 2880
    "PASSWORD_LENGTH" => 6
    "PASSWORD_UPPERCASE" => "N"
    "PASSWORD_LOWERCASE" => "N"
    "PASSWORD_DIGITS" => "N"
    "PASSWORD_PUNCTUATION" => "N"
    "PASSWORD_CHECK_WEAK" => "N"
    "PASSWORD_CHECK_POLICY" => "N"
    "PASSWORD_CHANGE_DAYS" => 0
    "PASSWORD_UNIQUE_COUNT" => 0
    "LOGIN_ATTEMPTS" => 0
    "BLOCK_LOGIN_ATTEMPTS" => 0
    "BLOCK_TIME" => 0
  ]
]
SESS_IP
"186.2.167.82"
SESS_TIME
1711702295
IS_EXPIRED
null
BX_SESSION_SIGN
"3e1b03ad9c05e296c12fa5c1dad2b97d"
fixed_session_id
"4a41e96cf04665345d4b5392c34f6989"
VIEWED_PRODUCT
0
SESS_SHOW_INCLUDE_TIME_EXEC
null
Key Value
REDIRECT_HTTPS
"on"
REDIRECT_UNIQUE_ID
"ZgaBF66ECikd0HozX95P7wAAAAk"
REDIRECT_SCRIPT_URL
"/blog/rabota-s-1s/dlya-kogo-deystvuet-otsrochka-po-strakhovym-vznosam-do-2024-goda/"
REDIRECT_SCRIPT_URI
"http://1bitcloud.ru:443/blog/rabota-s-1s/dlya-kogo-deystvuet-otsrochka-po-strakhovym-vznosam-do-2024-goda/"
REDIRECT_BITRIX_VA_VER
"7.5.4"
REDIRECT_BITRIX_ENV_TYPE
"general"
REDIRECT_AUTHBIND_UNAVAILABLE
"yes"
REDIRECT_STATUS
"200"
HTTPS
"on"
UNIQUE_ID
"ZgaBF66ECikd0HozX95P7wAAAAk"
SCRIPT_URL
"/blog/rabota-s-1s/dlya-kogo-deystvuet-otsrochka-po-strakhovym-vznosam-do-2024-goda/"
SCRIPT_URI
"http://1bitcloud.ru:443/blog/rabota-s-1s/dlya-kogo-deystvuet-otsrochka-po-strakhovym-vznosam-do-2024-goda/"
REMOTE_USER
""
BITRIX_VA_VER
"7.5.4"
BITRIX_ENV_TYPE
"general"
AUTHBIND_UNAVAILABLE
"yes"
HTTP_X_FORWARDED_FOR
"35.171.182.239, 186.2.167.82"
HTTP_HOST
"1bitcloud.ru:443"
HTTP_HTTPS
"YES"
HTTP_CONNECTION
"close"
HTTP_ACCEPT
"*/*"
HTTP_USER_AGENT
"claudebot"
HTTP_X_FORWARDED_PROTO
"https"
HTTP_DDG_CONNECTING_IP
"35.171.182.239"
PATH
"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"
SERVER_SIGNATURE
"<address>Apache Server at 1bitcloud.ru Port 443</address>\n"
SERVER_SOFTWARE
"Apache"
SERVER_NAME
"1bitcloud.ru"
SERVER_ADDR
"127.0.0.1"
SERVER_PORT
"443"
REMOTE_ADDR
"186.2.167.82"
DOCUMENT_ROOT
"/home/bitrix/www"
REQUEST_SCHEME
"http"
CONTEXT_PREFIX
""
CONTEXT_DOCUMENT_ROOT
"/home/bitrix/www"
SERVER_ADMIN
"webmaster@localhost"
SCRIPT_FILENAME
"/home/bitrix/www/bitrix/urlrewrite.php"
REMOTE_PORT
"60176"
REDIRECT_URL
"/blog/rabota-s-1s/dlya-kogo-deystvuet-otsrochka-po-strakhovym-vznosam-do-2024-goda/"
GATEWAY_INTERFACE
"CGI/1.1"
SERVER_PROTOCOL
"HTTP/1.0"
REQUEST_METHOD
"GET"
QUERY_STRING
""
REQUEST_URI
"/blog/rabota-s-1s/dlya-kogo-deystvuet-otsrochka-po-strakhovym-vznosam-do-2024-goda/"
SCRIPT_NAME
"/bitrix/urlrewrite.php"
PHP_SELF
"/bitrix/urlrewrite.php"
REQUEST_TIME_FLOAT
1711702295.0055
REQUEST_TIME
1711702295
REAL_FILE_PATH
"/blog/index.php"
empty
0. Whoops\Handler\PrettyPageHandler