postnl/postnl-magento2

[BUG] Generate Label causes Deprecated Functionality exception

Closed this issue · 1 comments

To Reproduce
Steps to reproduce the behavior:

  1. Receive order
  2. Create a shipment for the order
  3. use Generate Label option to create the label

Expected result
Successful creation of the label and being able to confirm the label afterwards.

Actual result
The exception occurred page is shown, below you can find the exception logs:
CRITICAL: Exception: Deprecated Functionality: explode(): Passing null to parameter #2 ($string) of type string is deprecated

An entry in the exception.log file (Admin Backend)
[2023-08-25T15:25:00.283391+00:00] main.CRITICAL: Exception: Deprecated Functionality: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/-shop/releases/52/vendor/tig/postnl-magento2/Config/Provider/LoggingConfiguration.php on line 24 in /var/www/-shop/releases/52/vendor/magento/framework/App/ErrorHandler.php:62
Stack trace:
#0 [internal function]: Magento\Framework\App\ErrorHandler->handler()
#1 /var/www/-shop/releases/52/vendor/tig/postnl-magento2/Config/Provider/LoggingConfiguration.php(24): explode()
#2 /var/www/-shop/releases/52/vendor/tig/postnl-magento2/Logging/Log.php(41): TIG\PostNL\Config\Provider\LoggingConfiguration->canLog()
#3 /var/www/-shop/releases/52/vendor/monolog/monolog/src/Monolog/Logger.php(598): TIG\PostNL\Logging\Log->addRecord()
#4 /var/www/-shop/releases/52/vendor/tig/postnl-magento2/Webservices/Api/Log.php(41): Monolog\Logger->debug()
#5 /var/www/-shop/releases/52/vendor/tig/postnl-magento2/Webservices/Soap.php(91): TIG\PostNL\Webservices\Api\Log->request()
#6 /var/www/-shop/releases/52/vendor/tig/postnl-magento2/Webservices/Endpoints/Barcode.php(124): TIG\PostNL\Webservices\Soap->call()
#7 /var/www/-shop/releases/52/vendor/tig/postnl-magento2/Service/Handler/BarcodeHandler.php(200): TIG\PostNL\Webservices\Endpoints\Barcode->call()
#8 /var/www/-shop/releases/52/vendor/tig/postnl-magento2/Service/Handler/BarcodeHandler.php(121): TIG\PostNL\Service\Handler\BarcodeHandler->generate()
#9 /var/www/-shop/releases/52/vendor/tig/postnl-magento2/Controller/Adminhtml/Shipment/PrintShippingLabel.php(98): TIG\PostNL\Service\Handler\BarcodeHandler->prepareShipment()
#10 /var/www/-shop/releases/52/vendor/tig/postnl-magento2/Controller/Adminhtml/Shipment/PrintShippingLabel.php(61): TIG\PostNL\Controller\Adminhtml\Shipment\PrintShippingLabel->getLabels()
#11 /var/www/-shop/releases/52/vendor/magento/framework/Interception/Interceptor.php(58): TIG\PostNL\Controller\Adminhtml\Shipment\PrintShippingLabel->execute()
#12 /var/www/-shop/releases/52/vendor/magento/framework/Interception/Interceptor.php(138): TIG\PostNL\Controller\Adminhtml\Shipment\PrintShippingLabel\Interceptor->___callParent()
#13 /var/www/-shop/releases/52/vendor/magento/framework/Interception/Interceptor.php(153): TIG\PostNL\Controller\Adminhtml\Shipment\PrintShippingLabel\Interceptor->Magento\Framework\Interception\{closure}()
#14 /var/www/-shop/releases/52/generated/code/TIG/PostNL/Controller/Adminhtml/Shipment/PrintShippingLabel/Interceptor.php(23): TIG\PostNL\Controller\Adminhtml\Shipment\PrintShippingLabel\Interceptor->___callPlugins()
#15 /var/www/-shop/releases/52/vendor/magento/framework/App/Action/Action.php(111): TIG\PostNL\Controller\Adminhtml\Shipment\PrintShippingLabel\Interceptor->execute()
#16 /var/www/-shop/releases/52/vendor/magento/module-backend/App/AbstractAction.php(151): Magento\Framework\App\Action\Action->dispatch()
#17 /var/www/-shop/releases/52/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Backend\App\AbstractAction->dispatch()
#18 /var/www/-shop/releases/52/vendor/magento/framework/Interception/Interceptor.php(138): TIG\PostNL\Controller\Adminhtml\Shipment\PrintShippingLabel\Interceptor->___callParent()
#19 /var/www/-shop/releases/52/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(145): TIG\PostNL\Controller\Adminhtml\Shipment\PrintShippingLabel\Interceptor->Magento\Framework\Interception\{closure}()
#20 /var/www/-shop/releases/52/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch()
#21 /var/www/-shop/releases/52/vendor/magento/framework/Interception/Interceptor.php(153): TIG\PostNL\Controller\Adminhtml\Shipment\PrintShippingLabel\Interceptor->Magento\Framework\Interception\{closure}()
#22 /var/www/-shop/releases/52/generated/code/TIG/PostNL/Controller/Adminhtml/Shipment/PrintShippingLabel/Interceptor.php(32): TIG\PostNL\Controller\Adminhtml\Shipment\PrintShippingLabel\Interceptor->___callPlugins()
#23 /var/www/-shop/releases/52/vendor/magento/framework/App/FrontController.php(245): TIG\PostNL\Controller\Adminhtml\Shipment\PrintShippingLabel\Interceptor->dispatch()
#24 /var/www/-shop/releases/52/vendor/magento/framework/App/FrontController.php(212): Magento\Framework\App\FrontController->getActionResponse()
#25 /var/www/-shop/releases/52/vendor/magento/framework/App/FrontController.php(147): Magento\Framework\App\FrontController->processRequest()
#26 /var/www/-shop/releases/52/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch()
#27 /var/www/-shop/releases/52/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent()
#28 /var/www/-shop/releases/52/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}()
#29 /var/www/-shop/releases/52/generated/code/Magento/Framework/App/FrontController/Interceptor.php(23): Magento\Framework\App\FrontController\Interceptor->___callPlugins()
#30 /var/www/-shop/releases/52/vendor/magento/framework/App/Http.php(116): Magento\Framework\App\FrontController\Interceptor->dispatch()
#31 /var/www/-shop/releases/52/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http->launch()
#32 /var/www/-shop/releases/52/pub/index.php(30): Magento\Framework\App\Bootstrap->run()
#33 {main} {"report_id":"9d119d0ca3deb11bbf0b95f274c1954e6e65537ebdd26a986f17540b881263b2","exception":"[object] (Exception(code: 0): Deprecated Functionality: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/-shop/releases/52/vendor/tig/postnl-magento2/Config/Provider/LoggingConfiguration.php on line 24 at /var/www/-shop/releases/52/vendor/magento/framework/App/ErrorHandler.php:62)"} []
An entry in the exception.log file (API)
[2023-08-25T15:03:20.902735+00:00] main.CRITICAL: Exception: Deprecated Functionality: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/-shop/releases/52/vendor/tig/postnl-magento2/Config/Provider/LoggingConfiguration.php on line 24 in /var/www/-shop/releases/52/vendor/magento/framework/App/ErrorHandler.php:62
Stack trace:
#0 [internal function]: Magento\Framework\App\ErrorHandler->handler()
#1 /var/www/-shop/releases/52/vendor/tig/postnl-magento2/Config/Provider/LoggingConfiguration.php(24): explode()
#2 /var/www/-shop/releases/52/vendor/tig/postnl-magento2/Logging/Log.php(41): TIG\PostNL\Config\Provider\LoggingConfiguration->canLog()
#3 /var/www/-shop/releases/52/vendor/monolog/monolog/src/Monolog/Logger.php(598): TIG\PostNL\Logging\Log->addRecord()
#4 /var/www/-shop/releases/52/vendor/tig/postnl-magento2/Webservices/Api/Log.php(41): Monolog\Logger->debug()
#5 /var/www/-shop/releases/52/vendor/tig/postnl-magento2/Webservices/Soap.php(91): TIG\PostNL\Webservices\Api\Log->request()
#6 /var/www/-shop/releases/52/vendor/tig/postnl-magento2/Webservices/Endpoints/Barcode.php(124): TIG\PostNL\Webservices\Soap->call()
#7 /var/www/-shop/releases/52/vendor/tig/postnl-magento2/Service/Handler/BarcodeHandler.php(200): TIG\PostNL\Webservices\Endpoints\Barcode->call()
#8 /var/www/-shop/releases/52/vendor/tig/postnl-magento2/Service/Handler/BarcodeHandler.php(121): TIG\PostNL\Service\Handler\BarcodeHandler->generate()
#9 /var/www/-shop/releases/52/vendor/tig/postnl-magento2/Service/Api/ShipmentManagement/GenerateLabel.php(51): TIG\PostNL\Service\Handler\BarcodeHandler->prepareShipment()
#10 /var/www/-shop/releases/52/vendor/tig/postnl-magento2/Service/Api/ShipmentManagement.php(110): TIG\PostNL\Service\Api\ShipmentManagement\GenerateLabel->generate()
#11 [internal function]: TIG\PostNL\Service\Api\ShipmentManagement->generateLabel()
#12 /var/www/-shop/releases/52/vendor/magento/module-webapi/Controller/Rest/SynchronousRequestProcessor.php(95): call_user_func_array()
#13 /var/www/-shop/releases/52/vendor/magento/module-webapi/Controller/Rest.php(202): Magento\Webapi\Controller\Rest\SynchronousRequestProcessor->process()
#14 /var/www/-shop/releases/52/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Webapi\Controller\Rest->dispatch()
#15 /var/www/-shop/releases/52/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Webapi\Controller\Rest\Interceptor->___callParent()
#16 /var/www/-shop/releases/52/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Webapi\Controller\Rest\Interceptor->Magento\Framework\Interception\{closure}()
#17 /var/www/-shop/releases/52/generated/code/Magento/Webapi/Controller/Rest/Interceptor.php(23): Magento\Webapi\Controller\Rest\Interceptor->___callPlugins()
#18 /var/www/-shop/releases/52/vendor/magento/framework/App/Http.php(116): Magento\Webapi\Controller\Rest\Interceptor->dispatch()
#19 /var/www/-shop/releases/52/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http->launch()
#20 /var/www/-shop/releases/52/pub/index.php(30): Magento\Framework\App\Bootstrap->run()
#21 {main}

Next Exception: Report ID: webapi-64e8c2b8dc13a; Message: Deprecated Functionality: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/-shop/releases/52/vendor/tig/postnl-magento2/Config/Provider/LoggingConfiguration.php on line 24 in /var/www/-shop/releases/52/vendor/magento/framework/Webapi/ErrorProcessor.php:208
Stack trace:
#0 /var/www/-shop/releases/52/vendor/magento/framework/Webapi/ErrorProcessor.php(153): Magento\Framework\Webapi\ErrorProcessor->_critical()
#1 /var/www/-shop/releases/52/vendor/magento/module-webapi/Controller/Rest.php(208): Magento\Framework\Webapi\ErrorProcessor->maskException()
#2 /var/www/-shop/releases/52/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Webapi\Controller\Rest->dispatch()
#3 /var/www/-shop/releases/52/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Webapi\Controller\Rest\Interceptor->___callParent()
#4 /var/www/-shop/releases/52/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Webapi\Controller\Rest\Interceptor->Magento\Framework\Interception\{closure}()
#5 /var/www/-shop/releases/52/generated/code/Magento/Webapi/Controller/Rest/Interceptor.php(23): Magento\Webapi\Controller\Rest\Interceptor->___callPlugins()
#6 /var/www/-shop/releases/52/vendor/magento/framework/App/Http.php(116): Magento\Webapi\Controller\Rest\Interceptor->dispatch()
#7 /var/www/-shop/releases/52/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http->launch()
#8 /var/www/-shop/releases/52/pub/index.php(30): Magento\Framework\App\Bootstrap->run()
#9 {main} {"exception":"[object] (Exception(code: 0): Report ID: webapi-64e8c2b8dc13a; Message: Deprecated Functionality: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/-shop/releases/52/vendor/tig/postnl-magento2/Config/Provider/LoggingConfiguration.php on line 24 at /var/www/-shop/releases/52/vendor/magento/framework/Webapi/ErrorProcessor.php:208)
[previous exception] [object] (Exception(code: 0): Deprecated Functionality: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/-shop/releases/52/vendor/tig/postnl-magento2/Config/Provider/LoggingConfiguration.php on line 24 at /var/www/-shop/releases/52/vendor/magento/framework/App/ErrorHandler.php:62)"} []

Workaround
None

** Please complete the following information**

  • Magento version: Magento 2.4.6
  • PHP version: 8.1.2
  • TIG PostNL version: 1.12.9

Hi memen45,

Thank you for reporting this issue. We have developed a fix for this and will release this soon.

Kind regards,
Team Channel Integrations
PostNL