weixin_39601794 2020-11-30 16:06 采纳率: 0%
浏览 0

getting warning while parseResponseHeader

Latest version of PHP paypal sdk. I am taking it via composer > "paypal/rest-api-sdk-php": "*",

I am getting error while parseResponseHeader as I am connecting paypal via proxy and in response i am getting extra header i.e. connection established and because of that getting below error.


{
    "code": -1,
    "message": "Notice: Undefined offset: 1",
    "trace": [
        {
            "namespace": "",
            "short_class": "",
            "class": "",
            "type": "",
            "function": "",
            "file": "/var/www/mps/vendor/paypal/rest-api-sdk-php/lib/PayPal/Core/PayPalHttpConnection.php",
            "line": 86,
            "args": []
        },
        {
            "namespace": "PayPal\\Core",
            "short_class": "PayPalHttpConnection",
            "class": "PayPal\\Core\\PayPalHttpConnection",
            "type": "->",
            "function": "parseResponseHeaders",
            "file": null,
            "line": null,
            "args": [

I suggest to put some condition like below in File : PayPalHttpConnection.php Method : parseResponseHeaders Line number : 85

php
 if (strpos($trimmedData, ":") == false) {
            return strlen($data);
}

Thanks, Gaurang

该提问来源于开源项目:paypal/PayPal-PHP-SDK

  • 写回答

0条回答 默认 最新

    报告相同问题?