ip2location / magento2-ip2location-countrystateblocker

Block visitors to your website from certain countries and states. It support multiple rules for blocking/redirection.
http://www.ip2location.com
6 stars 1 forks source link

Problem with magento 2.4.6 php8 #6

Open jeffs2303 opened 1 year ago

jeffs2303 commented 1 year ago

Sample DB and API is already configured.

[2023-05-01T03:26:41.393037+00:00] main.CRITICAL: Exception: Deprecated Functionality: preg_split(): Passing null to parameter #2 ($subject) of type string is deprecated in /app/code/Hexasoft/IP2LocationCountryBlocker/Helper/Data.php on line 82 in /vendor/magento/framework/App/ErrorHandler.php:62 Stack trace:

0 [internal function]: Magento\Framework\App\ErrorHandler->handler()

1 /app/code/Hexasoft/IP2LocationCountryBlocker/Helper/Data.php(82): preg_split()

2 /app/code/Hexasoft/IP2LocationCountryBlocker/Observer/Blocker.php(155): Hexasoft\IP2LocationCountryBlocker\Helper\Data->getIpBlacklist()

3 /app/code/Hexasoft/IP2LocationCountryBlocker/Observer/Blocker.php(73): Hexasoft\IP2LocationCountryBlocker\Observer\Blocker->isIpBlocked()

4 /vendor/magento/framework/Event/Invoker/InvokerDefault.php(88): Hexasoft\IP2LocationCountryBlocker\Observer\Blocker->execute()

5 /vendor/magento/framework/Event/Invoker/InvokerDefault.php(74): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod()

6 /vendor/magento/framework/Event/Manager.php(65): Magento\Framework\Event\Invoker\InvokerDefault->dispatch()

7 /generated/code/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch()

8 /vendor/magento/framework/App/FrontController.php(271): Magento\Framework\Event\Manager\Proxy->dispatch()

9 /vendor/magento/framework/App/FrontController.php(211): Magento\Framework\App\FrontController->dispatchPreDispatchEvents()

10 /vendor/magento/framework/App/FrontController.php(147): Magento\Framework\App\FrontController->processRequest()

11 /vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch()

12 /vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent()

13 /vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(99): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}()

14 /vendor/magento/framework/Interception/Interceptor.php(135): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch()

15 /vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(75): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}()

16 /vendor/magento/framework/Interception/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch()

17 /vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}()

18 /generated/code/Magento/Framework/App/FrontController/Interceptor.php(23): Magento\Framework\App\FrontController\Interceptor->___callPlugins()

19 /vendor/magento/framework/App/Http.php(116): Magento\Framework\App\FrontController\Interceptor->dispatch()

20 /vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http->launch()

21 /pub/index.php(30): Magento\Framework\App\Bootstrap->run()

22 {main} {"report_id":"03557391e8ae160ef02a67da1c9917a4c004c98c3f936eae17fbc7e52afd7c62","exception":"[object] (Exception(code: 0): Deprecated Functionality: preg_split(): Passing null to parameter #2 ($subject) of type string is deprecated in /app/code/Hexasoft/IP2LocationCountryBlocker/Helper/Data.php on line 82 at /vendor/magento/framework/App/ErrorHandler.php:62)"} []

ip2location commented 1 year ago

Can you please try with the version attached?

IP2LocationCountryBlocker.zip