Zend-http is generating errors due to tweakwise sending a float where integer or is_numeric is required.
Latest zend-http version (2.8.3, since 2018-01-08) has a new check on the timeout setting. Because tweakwise is providing a timeout in float format, this produce an error.
What is the purpose of this issue? Explain the background context.
Environment
PHP Version: (7.1)
Magento Version: 2.2.7
Tweakwise Version: 0.3.0
Tweakwise Export Version:
Magento Deploy Mode: production & development
Third party modules: zend-http 2.8.3
Steps to reproduce
Ensure to have magento 2.2.7 installed and updated with zend-http 2.8.3.
Pages using tweakwise will produce this error in support_report.log or frontend
Zend-http is generating errors due to tweakwise sending a float where integer or is_numeric is required.
Latest zend-http version (2.8.3, since 2018-01-08) has a new check on the timeout setting. Because tweakwise is providing a timeout in float format, this produce an error.
What is the purpose of this issue? Explain the background context.
Environment
Steps to reproduce
Ensure to have magento 2.2.7 installed and updated with zend-http 2.8.3. Pages using tweakwise will produce this error in support_report.log or frontend
Actual result
Error on frontend and in log:
2 exception(s): Exception #0 (Emico\Tweakwise\Exception\ApiException): integer or numeric string expected, got double Exception #1 (Zend\Http\Client\Adapter\Exception\InvalidArgumentException): integer or numeric string expected, got double
Exception #0 (Emico\Tweakwise\Exception\ApiException): integer or numeric string expected, got double
0 /Users/remco.schouten/websites/score/httpdocs/vendor/emico/tweakwise/src/Model/Client.php(166): Emico\Tweakwise\Model\Client->doRequest(Object(Emico\Tweakwise\Model\Client\Request\ProductNavigationRequest))
1 /Users/remco.schouten/websites/score/httpdocs/vendor/emico/tweakwise/src/Model/Catalog/Layer/NavigationContext.php(125): Emico\Tweakwise\Model\Client->request(Object(Emico\Tweakwise\Model\Client\Request\ProductNavigationRequest))
2 /Users/remco.schouten/websites/score/httpdocs/vendor/emico/tweakwise/src/Model/Catalog/Layer/NavigationContext/CurrentContext.php(59): Emico\Tweakwise\Model\Catalog\Layer\NavigationContext->getResponse()
3 /Users/remco.schouten/websites/score/httpdocs/vendor/emico/tweakwise/src/Block/Catalog/Product/ProductList/Toolbar/Plugin.php(54): Emico\Tweakwise\Model\Catalog\Layer\NavigationContext\CurrentContext->getResponse()
4 /Users/remco.schouten/websites/score/httpdocs/vendor/magento/framework/Interception/Interceptor.php(135): Emico\Tweakwise\Block\Catalog\Product\ProductList\Toolbar\Plugin->aroundGetAvailableOrders(Object(Magento\Catalog\Block\Product\ProductList\Toolbar\Interceptor), Object(Closure))
Expected result
no error message