TypeError: Cannot assign string to property Drupal\smart_ip\SmartIpLocation::$latitude

Created on 25 March 2023, over 1 year ago
Updated 28 July 2024, 4 months ago

On drush cr on D10 I have:

Fatal error: Uncaught TypeError: Cannot assign string to property Drupal\smart_ip\SmartIpLocation::$latitude of type float in /var/www/lom/web/modules/contrib/smart_ip/src/SmartIpLocation.php:204
Stack trace:
#0 /var/www/lom/web/modules/contrib/smart_ip/modules/smart_ip_maxmind_geoip2_bin_db/src/EventSubscriber/SmartIpEventSubscriber.php(109): Drupal\smart_ip\SmartIpLocation->set()
#1 [internal function]: Drupal\smart_ip_maxmind_geoip2_bin_db\EventSubscriber\SmartIpEventSubscriber->processQuery()
#2 /var/www/lom/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func()
#3 /var/www/lom/web/modules/contrib/smart_ip/src/SmartIp.php(59): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#4 /var/www/lom/web/modules/contrib/smart_ip/src/SmartIp.php(267): Drupal\smart_ip\SmartIp::query()
#5 /var/www/lom/web/modules/contrib/smart_ip/src/SmartIpLocation.php(180): Drupal\smart_ip\SmartIp::updateUserLocation()
#6 /var/www/rg_common/modules/rg_smart_ip/src/RgSmartIpLocation.php(68): Drupal\smart_ip\SmartIpLocation->getData()
#7 /var/www/rg_common/modules/rg_location/src/RgRegionManager.php(205): Drupal\rg_smart_ip\RgSmartIpLocation->getData()
#8 /var/www/rg_common/modules/rg_location/src/RgRegionManager.php(75): Drupal\rg_location\RgRegionManager->getByIp()
#9 /var/www/rg_common/modules/rg_location/src/RgLocationFactory.php(82): Drupal\rg_location\RgRegionManager->getCurrentCityTid()
#10 /var/www/rg_common/modules/rg_location/src/ContextProvider/CurrentLocationContext.php(24): Drupal\rg_location\RgLocationFactory->createCurrent()
#11 /var/www/rg_common/modules/rg_location/src/ContextProvider/LocationContextBase.php(83): Drupal\rg_location\ContextProvider\CurrentLocationContext->getLocation()
#12 /var/www/lom/web/core/lib/Drupal/Core/Plugin/Context/LazyContextRepository.php(97): Drupal\rg_location\ContextProvider\LocationContextBase->getAvailableContexts()
#13 /var/www/lom/web/core/lib/Drupal/Core/ParamConverter/EntityConverter.php(141): Drupal\Core\Plugin\Context\LazyContextRepository->getAvailableContexts()
#14 /var/www/lom/web/core/lib/Drupal/Core/ParamConverter/ParamConverterManager.php(100): Drupal\Core\ParamConverter\EntityConverter->convert()
#15 /var/www/lom/web/core/lib/Drupal/Core/Routing/Enhancer/ParamConversionEnhancer.php(45): Drupal\Core\ParamConverter\ParamConverterManager->convert()
#16 /var/www/lom/web/core/lib/Drupal/Core/Routing/Router.php(238): Drupal\Core\Routing\Enhancer\ParamConversionEnhancer->enhance()
#17 /var/www/lom/web/core/lib/Drupal/Core/Routing/Router.php(118): Drupal\Core\Routing\Router->applyRouteEnhancers()
#18 /var/www/lom/web/core/lib/Drupal/Core/Routing/Router.php(103): Drupal\Core\Routing\Router->matchRequest()
#19 /var/www/lom/web/core/lib/Drupal/Core/Path/PathValidator.php(161): Drupal\Core\Routing\Router->match()
#20 /var/www/lom/web/core/lib/Drupal/Core/Path/PathValidator.php(122): Drupal\Core\Path\PathValidator->getPathAttributes()
#21 /var/www/lom/web/core/lib/Drupal/Core/Path/PathValidator.php(89): Drupal\Core\Path\PathValidator->getUrl()
#22 /var/www/lom/web/core/lib/Drupal/Core/Url.php(427): Drupal\Core\Path\PathValidator->getUrlIfValidWithoutAccessCheck()
#23 /var/www/lom/web/core/lib/Drupal/Core/Url.php(319): Drupal\Core\Url::fromInternalUri()
#24 /var/www/lom/web/core/modules/link/src/Plugin/Field/FieldType/LinkItem.php(175): Drupal\Core\Url::fromUri()
#25 /var/www/lom/web/core/modules/menu_link_content/src/Entity/MenuLinkContent.php(94): Drupal\link\Plugin\Field\FieldType\LinkItem->getUrl()
#26 /var/www/lom/web/modules/contrib/menu_item_extras/src/Entity/MenuItemExtrasMenuLinkContent.php(34): Drupal\menu_link_content\Entity\MenuLinkContent->getUrlObject()
#27 /var/www/lom/web/core/modules/menu_link_content/src/Entity/MenuLinkContent.php(156): Drupal\menu_item_extras\Entity\MenuItemExtrasMenuLinkContent->getUrlObject()
#28 /var/www/lom/web/core/modules/menu_link_content/src/Plugin/Deriver/MenuLinkContentDeriver.php(69): Drupal\menu_link_content\Entity\MenuLinkContent->getPluginDefinition()
#29 /var/www/lom/web/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php(101): Drupal\menu_link_content\Plugin\Deriver\MenuLinkContentDeriver->getDerivativeDefinitions()
#30 /var/www/lom/web/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php(87): Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDerivatives()
#31 /var/www/lom/web/core/lib/Drupal/Core/Menu/MenuLinkManager.php(164): Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions()
#32 /var/www/lom/web/core/lib/Drupal/Core/Menu/MenuLinkManager.php(189): Drupal\Core\Menu\MenuLinkManager->getDefinitions()
#33 /var/www/lom/web/core/lib/Drupal/Core/EventSubscriber/MenuRouterRebuildSubscriber.php(82): Drupal\Core\Menu\MenuLinkManager->rebuild()
#34 /var/www/lom/web/core/lib/Drupal/Core/EventSubscriber/MenuRouterRebuildSubscriber.php(70): Drupal\Core\EventSubscriber\MenuRouterRebuildSubscriber->menuLinksRebuild()
#35 [internal function]: Drupal\Core\EventSubscriber\MenuRouterRebuildSubscriber->onRouterRebuild()
#36 /var/www/lom/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func()
#37 /var/www/lom/web/core/lib/Drupal/Core/Routing/RouteBuilder.php(197): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#38 /var/www/lom/web/core/lib/Drupal/Core/ProxyClass/Routing/RouteBuilder.php(83): Drupal\Core\Routing\RouteBuilder->rebuild()
#39 /var/www/lom/web/core/includes/common.inc(518): Drupal\Core\ProxyClass\Routing\RouteBuilder->rebuild()
#40 /var/www/lom/web/core/includes/utility.inc(41): drupal_flush_all_caches()
#41 /var/www/lom/vendor/drush/drush/src/Commands/core/CacheCommands.php(228): drupal_rebuild()
#42 [internal function]: Drush\Commands\core\CacheCommands->rebuild()
#43 /var/www/lom/vendor/consolidation/annotated-command/src/CommandProcessor.php(257): call_user_func_array()
#44 /var/www/lom/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback()
#45 /var/www/lom/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter()
#46 /var/www/lom/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(390): Consolidation\AnnotatedCommand\CommandProcessor->process()
#47 /var/www/lom/vendor/symfony/console/Command/Command.php(312): Consolidation\AnnotatedCommand\AnnotatedCommand->execute()
#48 /var/www/lom/vendor/symfony/console/Application.php(1040): Symfony\Component\Console\Command\Command->run()
#49 /var/www/lom/vendor/symfony/console/Application.php(314): Symfony\Component\Console\Application->doRunCommand()
#50 /var/www/lom/vendor/symfony/console/Application.php(168): Symfony\Component\Console\Application->doRun()
#51 /var/www/lom/vendor/drush/drush/src/Runtime/Runtime.php(124): Symfony\Component\Console\Application->run()
#52 /var/www/lom/vendor/drush/drush/src/Runtime/Runtime.php(51): Drush\Runtime\Runtime->doRun()
#53 /var/www/lom/vendor/drush/drush/drush.php(77): Drush\Runtime\Runtime->run()
#54 /var/www/lom/vendor/drush/drush/includes/preflight.inc(18): require('...')
#55 phar:///usr/local/bin/drush/bin/drush.php(143): drush_main()
#56 /usr/local/bin/drush(14): require('...')
#57 {main}
  thrown in /var/www/lom/web/modules/contrib/smart_ip/src/SmartIpLocation.php on line 204
 [warning] Drush command terminated abnormally.
πŸ› Bug report
Status

Needs review

Version

5.0

Component

Code

Created by

πŸ‡·πŸ‡ΈSerbia super_romeo Belgrade

Live updates comments and jobs are added and updated live.
  • PHP 8.1

    The issue particularly affects sites running on PHP version 8.1.0 or later.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024