Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated use of base64_encode in Observer/SalesQuoteSaveAfter.php #304

Open
gldt-arandazzo opened this issue Jun 13, 2024 · 2 comments
Open

Comments

@gldt-arandazzo
Copy link

Environment details

PHP version: 8.1-latest
Magento version: 2.4.6-p6 (Commerce B2B)
Klaviyo extension version: 4.1.3

Steps to reproduce

Upon inspecting my system.log file, I am seeing errors related to the Klaviyo SalesQuoteSaveAfter.php observer.

report.CRITICAL: Deprecated Functionality: base64_encode(): Passing null to parameter #1 ($string) of type string is deprecated in /var/vhosts/domain.com/www/vendor/klaviyo/magento2-extension/Observer/SalesQuoteSaveAfter.php on line 139

Full stack trace

report.CRITICAL: Deprecated Functionality: base64_encode(): Passing null to parameter #1 ($string) of type string is deprecated in /var/vhosts/domain.com/www/vendor/klaviyo/magento2-extension/Observer/SalesQuoteSaveAfter.php on line 139 #0 [internal function]: Magento\Framework\App\ErrorHandler->handler() #1 /var/vhosts/domain.com/www/vendor/klaviyo/magento2-extension/Observer/SalesQuoteSaveAfter.php(139): base64_encode() #2 /var/vhosts/domain.com/www/vendor/klaviyo/magento2-extension/Observer/SalesQuoteSaveAfter.php(96): Klaviyo\Reclaim\Observer\SalesQuoteSaveAfter->checkCustomerAndReturnEncodedId() #3 /var/vhosts/domain.com/www/vendor/magento/framework/Event/Invoker/InvokerDefault.php(88): Klaviyo\Reclaim\Observer\SalesQuoteSaveAfter->execute() #4 /var/vhosts/domain.com/www/vendor/magento/framework/Event/Invoker/InvokerDefault.php(74): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod() #5 /var/vhosts/domain.com/www/vendor/magento/module-staging/Model/Event/Manager.php(97): Magento\Framework\Event\Invoker\InvokerDefault->dispatch() #6 /var/vhosts/domain.com/www/generated/code/Magento/Staging/Model/Event/Manager/Proxy.php(95): Magento\Staging\Model\Event\Manager->dispatch() #7 /var/vhosts/domain.com/www/vendor/magento/framework/Model/AbstractModel.php(837): Magento\Staging\Model\Event\Manager\Proxy->dispatch() #8 /var/vhosts/domain.com/www/vendor/magento/framework/Model/ResourceModel/Db/VersionControl/AbstractDb.php(56): Magento\Framework\Model\AbstractModel->afterSave() #9 /var/vhosts/domain.com/www/vendor/magento/framework/Model/ResourceModel/Db/AbstractDb.php(402): Magento\Framework\Model\ResourceModel\Db\VersionControl\AbstractDb->processAfterSaves() #10 /var/vhosts/domain.com/www/vendor/magento/module-quote/Model/ResourceModel/Quote.php(317): Magento\Framework\Model\ResourceModel\Db\AbstractDb->save() #11 /var/vhosts/domain.com/www/vendor/magento/module-quote/Model/QuoteRepository/SaveHandler.php(121): Magento\Quote\Model\ResourceModel\Quote->save() #12 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Quote\Model\QuoteRepository\SaveHandler->save() #13 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Quote\Model\QuoteRepository\SaveHandler\Interceptor->___callParent() #14 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Quote\Model\QuoteRepository\SaveHandler\Interceptor->Magento\Framework\Interception\{closure}() #15 /var/vhosts/domain.com/www/generated/code/Magento/Quote/Model/QuoteRepository/SaveHandler/Interceptor.php(23): Magento\Quote\Model\QuoteRepository\SaveHandler\Interceptor->___callPlugins() #16 /var/vhosts/domain.com/www/vendor/magento/module-quote/Model/QuoteRepository.php(202): Magento\Quote\Model\QuoteRepository\SaveHandler\Interceptor->save() #17 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Quote\Model\QuoteRepository->save() #18 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Quote\Model\QuoteRepository\Interceptor->___callParent() #19 /var/vhosts/domain.com/www/vendor/magento/module-negotiable-quote/Model/Plugin/Quote/Model/QuoteRepositoryPlugin.php(98): Magento\Quote\Model\QuoteRepository\Interceptor->Magento\Framework\Interception\{closure}() #20 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(135): Magento\NegotiableQuote\Model\Plugin\Quote\Model\QuoteRepositoryPlugin->aroundSave() #21 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Quote\Model\QuoteRepository\Interceptor->Magento\Framework\Interception\{closure}() #22 /var/vhosts/domain.com/www/generated/code/Magento/Quote/Model/QuoteRepository/Interceptor.php(59): Magento\Quote\Model\QuoteRepository\Interceptor->___callPlugins() #23 /var/vhosts/domain.com/www/vendor/magento/module-backend/Model/Session/Quote.php(158): Magento\Quote\Model\QuoteRepository\Interceptor->save() #24 /var/vhosts/domain.com/www/vendor/vertexinc/vertex-tax-module/Model/RequestLogger.php(223): Magento\Backend\Model\Session\Quote->getQuote() #25 /var/vhosts/domain.com/www/vendor/vertexinc/vertex-tax-module/Model/RequestLogger.php(135): Vertex\Tax\Model\RequestLogger->getCurrentAdminQuote() #26 /var/vhosts/domain.com/www/vendor/vertexinc/vertex-tax-module/Model/Api/Logger.php(107): Vertex\Tax\Model\RequestLogger->log() #27 /var/vhosts/domain.com/www/vendor/vertexinc/vertex-tax-module/Model/Api/Logger.php(67): Vertex\Tax\Model\Api\Logger->logRequest() #28 /var/vhosts/domain.com/www/vendor/vertexinc/vertex-tax-module/Service/QuoteProxy.php(50): Vertex\Tax\Model\Api\Logger->wrapCall() #29 /var/vhosts/domain.com/www/vendor/vertexinc/vertex-tax-module/Model/TaxQuote/TaxQuoteRequest.php(92): Vertex\Tax\Service\QuoteProxy->request() #30 /var/vhosts/domain.com/www/vendor/vertexinc/vertex-tax-module/Model/Calculator.php(152): Vertex\Tax\Model\TaxQuote\TaxQuoteRequest->taxQuote() #31 /var/vhosts/domain.com/www/vendor/vertexinc/vertex-tax-module/Model/Plugin/TaxCalculationPlugin.php(75): Vertex\Tax\Model\Calculator->calculateTax() #32 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(135): Vertex\Tax\Model\Plugin\TaxCalculationPlugin->aroundCalculateTax() #33 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Tax\Model\TaxCalculation\Interceptor->Magento\Framework\Interception\{closure}() #34 /var/vhosts/domain.com/www/generated/code/Magento/Tax/Model/TaxCalculation/Interceptor.php(23): Magento\Tax\Model\TaxCalculation\Interceptor->___callPlugins() #35 /var/vhosts/domain.com/www/vendor/magento/module-tax/Model/Sales/Total/Quote/Subtotal.php(43): Magento\Tax\Model\TaxCalculation\Interceptor->calculateTax() #36 /var/vhosts/domain.com/www/vendor/magento/module-quote/Model/Quote/TotalsCollector.php(261): Magento\Tax\Model\Sales\Total\Quote\Subtotal->collect() #37 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Quote\Model\Quote\TotalsCollector->collectAddressTotals() #38 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Quote\Model\Quote\TotalsCollector\Interceptor->___callParent() #39 /var/vhosts/domain.com/www/vendor/amasty/promo/Plugin/Quote/Model/Quote/TotalsCollectorPlugin.php(157): Magento\Quote\Model\Quote\TotalsCollector\Interceptor->Magento\Framework\Interception\{closure}() #40 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(135): Amasty\Promo\Plugin\Quote\Model\Quote\TotalsCollectorPlugin->aroundCollectAddressTotals() #41 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Quote\Model\Quote\TotalsCollector\Interceptor->Magento\Framework\Interception\{closure}() #42 /var/vhosts/domain.com/www/generated/code/Magento/Quote/Model/Quote/TotalsCollector/Interceptor.php(41): Magento\Quote\Model\Quote\TotalsCollector\Interceptor->___callPlugins() #43 /var/vhosts/domain.com/www/vendor/magento/module-quote/Model/Quote/TotalsCollector.php(156): Magento\Quote\Model\Quote\TotalsCollector\Interceptor->collectAddressTotals() #44 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Quote\Model\Quote\TotalsCollector->collect() #45 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Quote\Model\Quote\TotalsCollector\Interceptor->___callParent() #46 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Quote\Model\Quote\TotalsCollector\Interceptor->Magento\Framework\Interception\{closure}() #47 /var/vhosts/domain.com/www/generated/code/Magento/Quote/Model/Quote/TotalsCollector/Interceptor.php(32): Magento\Quote\Model\Quote\TotalsCollector\Interceptor->___callPlugins() #48 /var/vhosts/domain.com/www/vendor/magento/module-quote/Model/Quote.php(2021): Magento\Quote\Model\Quote\TotalsCollector\Interceptor->collect() #49 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Quote\Model\Quote->collectTotals() #50 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Quote\Model\Quote\Interceptor->___callParent() #51 /var/vhosts/domain.com/www/vendor/magento/module-deferred-total-calculating/Plugin/TotalsCollectorPlugin.php(137): Magento\Quote\Model\Quote\Interceptor->Magento\Framework\Interception\{closure}() #52 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(135): Magento\DeferredTotalCalculating\Plugin\TotalsCollectorPlugin->aroundCollectTotals() #53 /var/vhosts/domain.com/www/vendor/magento/module-purchase-order/Plugin/Quote/Model/QuotePlugin.php(46): Magento\Quote\Model\Quote\Interceptor->Magento\Framework\Interception\{closure}() #54 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(135): Magento\PurchaseOrder\Plugin\Quote\Model\QuotePlugin->aroundCollectTotals() #55 /var/vhosts/domain.com/www/vendor/magento/module-negotiable-quote/Plugin/Quote/Model/QuotePlugin.php(102): Magento\Quote\Model\Quote\Interceptor->Magento\Framework\Interception\{closure}() #56 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(135): Magento\NegotiableQuote\Plugin\Quote\Model\QuotePlugin->aroundCollectTotals() #57 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Quote\Model\Quote\Interceptor->Magento\Framework\Interception\{closure}() #58 /var/vhosts/domain.com/www/generated/code/Magento/Quote/Model/Quote/Interceptor.php(95): Magento\Quote\Model\Quote\Interceptor->___callPlugins() #59 /var/vhosts/domain.com/www/vendor/magento/module-checkout/Model/Cart.php(594): Magento\Quote\Model\Quote\Interceptor->collectTotals() #60 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Checkout\Model\Cart->save() #61 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Checkout\Model\Cart\Interceptor->___callParent() #62 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Checkout\Model\Cart\Interceptor->Magento\Framework\Interception\{closure}() #63 /var/vhosts/domain.com/www/generated/code/Magento/Checkout/Model/Cart/Interceptor.php(23): Magento\Checkout\Model\Cart\Interceptor->___callPlugins() #64 /var/vhosts/domain.com/www/vendor/amasty/cart/Controller/Cart/Add.php(247): Magento\Checkout\Model\Cart\Interceptor->save() #65 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(58): Amasty\Cart\Controller\Cart\Add->execute() #66 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(138): Amasty\Cart\Controller\Cart\Add\Interceptor->___callParent() #67 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(153): Amasty\Cart\Controller\Cart\Add\Interceptor->Magento\Framework\Interception\{closure}() #68 /var/vhosts/domain.com/www/generated/code/Amasty/Cart/Controller/Cart/Add/Interceptor.php(23): Amasty\Cart\Controller\Cart\Add\Interceptor->___callPlugins() #69 /var/vhosts/domain.com/www/vendor/magento/framework/App/Action/Action.php(111): Amasty\Cart\Controller\Cart\Add\Interceptor->execute() #70 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Action\Action->dispatch() #71 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(138): Amasty\Cart\Controller\Cart\Add\Interceptor->___callParent() #72 /var/vhosts/domain.com/www/vendor/magento/module-company/Plugin/Framework/App/Action/AbstractActionPlugin.php(65): Amasty\Cart\Controller\Cart\Add\Interceptor->Magento\Framework\Interception\{closure}() #73 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Company\Plugin\Framework\App\Action\AbstractActionPlugin->aroundDispatch() #74 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(153): Amasty\Cart\Controller\Cart\Add\Interceptor->Magento\Framework\Interception\{closure}() #75 /var/vhosts/domain.com/www/generated/code/Amasty/Cart/Controller/Cart/Add/Interceptor.php(32): Amasty\Cart\Controller\Cart\Add\Interceptor->___callPlugins() #76 /var/vhosts/domain.com/www/vendor/magento/framework/App/FrontController.php(245): Amasty\Cart\Controller\Cart\Add\Interceptor->dispatch() #77 /var/vhosts/domain.com/www/vendor/magento/framework/App/FrontController.php(212): Magento\Framework\App\FrontController->getActionResponse() #78 /var/vhosts/domain.com/www/vendor/magento/framework/App/FrontController.php(147): Magento\Framework\App\FrontController->processRequest() #79 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch() #80 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent() #81 /var/vhosts/domain.com/www/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(99): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() #82 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch() #83 /var/vhosts/domain.com/www/vendor/amasty/aminvisiblecaptcha/Plugin/Framework/App/FrontControllerInterface/ValidateCaptcha.php(124): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() #84 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(135): Amasty\InvisibleCaptcha\Plugin\Framework\App\FrontControllerInterface\ValidateCaptcha->aroundDispatch() #85 /var/vhosts/domain.com/www/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(75): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() #86 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch() #87 /var/vhosts/domain.com/www/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() #88 /var/vhosts/domain.com/www/generated/code/Magento/Framework/App/FrontController/Interceptor.php(23): Magento\Framework\App\FrontController\Interceptor->___callPlugins() #89 /var/vhosts/domain.com/www/vendor/magento/framework/App/Http.php(116): Magento\Framework\App\FrontController\Interceptor->dispatch() #90 /var/vhosts/domain.com/www/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http->launch() #91 /var/vhosts/domain.com/www/pub/index.php(30): Magento\Framework\App\Bootstrap->run() #92 {main} [] []

Expected result

No Errors in log files

Actual result

Error in log file

Additional information

No response

@cykolln
Copy link
Contributor

cykolln commented Jun 13, 2024

Thank you for letting us know - we are intending on doing a full clean-up of the extension to ensure compatibility w/ PHP 8.3 and will get this deprecation fixed as part of that work.

@cykolln cykolln added the Progress: In Backlog Issue is triaged and in our backlog label Jun 13, 2024
@cykolln cykolln added Progress: Ready Issue is in an upcoming sprint and removed Progress: In Backlog Issue is triaged and in our backlog labels Jun 24, 2024
@cykolln cykolln added Progress: In Backlog Issue is triaged and in our backlog and removed Progress: Ready Issue is in an upcoming sprint labels Jul 2, 2024
@cykolln cykolln added Progress: Ready Issue is in an upcoming sprint and removed Progress: In Backlog Issue is triaged and in our backlog labels Oct 21, 2024
@cykolln
Copy link
Contributor

cykolln commented Nov 4, 2024

This fix has been merged - we are targeting to release 4.2.1 in the next 2 weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants