You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. There is an issue with decoding empty Carriergroup Shipping Details inside the ShippingInformationPlugin::saveCarrierGroupInformation() on PHP7 (Magento 2.0.7 EE) when found rate has 'carriergroup_shipping_details' key set to null.
ShipperHQ\Shipper\Helper\Data::decodeShippingDetails() utilizes Magento Json helper which uses Zend_Json::decode() implementation under the hood.
In case php json extension is installed on the host system, json_decode() will be used to decode the shipping details. But, in PHP7 json_decode() will produce a syntax error upon empty string decoding.
This issue could be temporary mitigated by setting Zend_Json::$useBuiltinEncoderDecoder to true from outside the method in order to avoid using json_decode(). But this is not a best way to address the issue.
Even if you would manage to decode the shipping details by utilizing Zend_Json::$useBuiltinEncoderDecoder flag you will get NULL which will break the array key check, producing the error: "Warning: array_key_exists() expects parameter 2 to be array, null given..."
Hello. There is an issue with decoding empty Carriergroup Shipping Details inside the ShippingInformationPlugin::saveCarrierGroupInformation() on PHP7 (Magento 2.0.7 EE) when found rate has 'carriergroup_shipping_details' key set to null.
In case php json extension is installed on the host system, json_decode() will be used to decode the shipping details. But, in PHP7 json_decode() will produce a syntax error upon empty string decoding.
This issue could be temporary mitigated by setting Zend_Json::$useBuiltinEncoderDecoder to true from outside the method in order to avoid using json_decode(). But this is not a best way to address the issue.
The text was updated successfully, but these errors were encountered: