Error
Call to a member function getGeoData() on null Error thrown with message "Call to a member function getGeoData() on null" Stacktrace: #9 Error in /home/bitrix/www/local/components/firstbit/regions.list/class.php:69 #8 RegionsListComponent:getUserCity in /home/bitrix/www/local/components/firstbit/regions.list/class.php:85 #7 RegionsListComponent:setUserCity in /home/bitrix/www/local/components/firstbit/regions.list/class.php:197 #6 RegionsListComponent:executeComponent in /home/bitrix/www/bitrix/modules/main/classes/general/component.php:660 #5 CBitrixComponent:includeComponent in /home/bitrix/www/bitrix/modules/main/classes/general/main.php:1072 #4 CAllMain:IncludeComponent in /home/bitrix/www/local/templates/1bitcloud/header.php:302 #3 include_once in /home/bitrix/www/bitrix/modules/main/include/prolog_after.php:120 #2 require in /home/bitrix/www/bitrix/modules/main/include/prolog.php:11 #1 require_once in /home/bitrix/www/bitrix/header.php:1 #0 require in /home/bitrix/www/catalog/index.php:10
Stack frames (10)
9
Error
/home/bitrix/www/local/components/firstbit/regions.list/class.php69
8
RegionsListComponent getUserCity
/home/bitrix/www/local/components/firstbit/regions.list/class.php85
7
RegionsListComponent setUserCity
/home/bitrix/www/local/components/firstbit/regions.list/class.php197
6
RegionsListComponent executeComponent
/home/bitrix/www/bitrix/modules/main/classes/general/component.php660
5
CBitrixComponent includeComponent
/home/bitrix/www/bitrix/modules/main/classes/general/main.php1072
4
CAllMain IncludeComponent
/home/bitrix/www/local/templates/1bitcloud/header.php302
3
include_once
/home/bitrix/www/bitrix/modules/main/include/prolog_after.php120
2
require
/home/bitrix/www/bitrix/modules/main/include/prolog.php11
1
require_once
/home/bitrix/www/bitrix/header.php1
0
require
/home/bitrix/www/catalog/index.php10
/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/catalog/index.php
<?
if (isset($_REQUEST['page'])) {
    $_GET['PAGEN_1'] = $_REQUEST['page'];
}
 
if (isset($_REQUEST['showall'])) {
    $_GET['SHOWALL_1'] = $_REQUEST['showall'];
}
 
require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/header.php");
$APPLICATION->SetPageProperty("keywords", "");
 
if ($APPLICATION->GetCurDir() == "/catalog/") {
    $APPLICATION->SetPageProperty("description",
        "Каталог облачных решений 1С для малого бизнеса – аренда программного обеспечения в облаке через Интернет для бизнеса");
}
 
$APPLICATION->SetPageProperty("title",
    "Облачные сервисы для малого бизнеса в Москве – облачные решения 1С для бизнеса");
$APPLICATION->SetTitle("Каталог решений");
?>
<?
define('CATALOG_SECTION_TOP_ITEM_TITLE_LENGTH', 27); // блок TOP на странице отрасли: длина заголовка
define('CATALOG_SECTION_TOP_ITEM_TEXT_LENGTH', 70); // блок TOP на странице отрасли: длина описания
define('CATALOG_SECTION_ITEM_TEXT_LENGTH', 100); // основной блок продуктов на странице отрасли: длина описания
define('CATALOG_ELEMENT_BANNER_TEXT_LENGTH', 150); // баннер: длина описания
 
//TODO перенести конфиг в init.php или сделать отдельный конфиг файл
define('CATALOG_ITEM_TYPES_PROPERTY_ID', 114);
define('CATALOG_ITEM_TYPES_1BIT', 97);
define('CATALOG_ITEM_TYPES_1C', 98);
define('CATALOG_ITEM_TYPES_ANY', 99);
define('CATALOG_ITEM_TYPES_SERVICES', 106);
define('CATALOG_ITEM_TYPES', [
    CATALOG_ITEM_TYPES_1BIT => 'Решения Первый Бит',
    CATALOG_ITEM_TYPES_1C => 'Решения 1С',
    CATALOG_ITEM_TYPES_ANY => 'Для любого бизнеса',
    CATALOG_ITEM_TYPES_SERVICES => 'Сервисы 1С',
    0 => 'Все решения'
]);
Arguments
  1. "/home/bitrix/www/bitrix/header.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.92"
SESS_TIME
1711722135
IS_EXPIRED
null
BX_SESSION_SIGN
"3e1b03ad9c05e296c12fa5c1dad2b97d"
fixed_session_id
"298fd40525843e48d336df91219f1bd7"
VIEWED_PRODUCT
0
SESS_SHOW_INCLUDE_TIME_EXEC
null
Key Value
HTTPS
"on"
UNIQUE_ID
"ZgbOl7OusS457BVXPh2GVgAAABk"
SCRIPT_URL
"/catalog/"
SCRIPT_URI
"http://1bitcloud.ru:443/catalog/"
REMOTE_USER
""
BITRIX_VA_VER
"7.5.4"
BITRIX_ENV_TYPE
"general"
AUTHBIND_UNAVAILABLE
"yes"
HTTP_X_FORWARDED_FOR
"54.224.43.79, 186.2.167.92"
HTTP_HOST
"1bitcloud.ru:443"
HTTP_HTTPS
"YES"
HTTP_CONNECTION
"close"
HTTP_ACCEPT
"*/*"
HTTP_USER_AGENT
"claudebot"
HTTP_REFERER
"http://www.1bitcloud.ru/catalog/"
HTTP_X_FORWARDED_PROTO
"https"
HTTP_DDG_CONNECTING_IP
"54.224.43.79"
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.92"
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/catalog/index.php"
REMOTE_PORT
"59878"
GATEWAY_INTERFACE
"CGI/1.1"
SERVER_PROTOCOL
"HTTP/1.0"
REQUEST_METHOD
"GET"
QUERY_STRING
""
REQUEST_URI
"/catalog/"
SCRIPT_NAME
"/catalog/index.php"
PHP_SELF
"/catalog/index.php"
REQUEST_TIME_FLOAT
1711722135.64
REQUEST_TIME
1711722135
empty
0. Whoops\Handler\PrettyPageHandler