Skip to content

Undefined index: Content-Type #237

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

Closed
Nks opened this issue Jul 17, 2019 · 8 comments
Closed

Undefined index: Content-Type #237

Nks opened this issue Jul 17, 2019 · 8 comments

Comments

@Nks
Copy link

Nks commented Jul 17, 2019

/vendor/quickbooks/v3-php-sdk/src/Core/HttpClients/SyncRestHandler.php
270 row

Here the headers:

  "content-type" => "application/xml;charset=UTF-8"
  "server" => "nginx"
  "strict-transport-security" => "max-age=15552000"
  "intuit_tid" => "ad5f9bcd-9325-4b35-bb79-09f3bea9fd39"
  "set-cookie" => "JSESSIONID=4AFACBDE0623B7F206C0AF71AF703942.c41-pprdc41uw2apv090094-stack-a; Domain=qbo.intuit.com; Path=/; Secure; HttpOnly"
  "qbo-version" => "1915.183"
  "service-time" => "total=209, db=28"
  "expires" => "0"
  "cache-control" => "max-age=0, no-cache, no-store, must-revalidate, private"
  "vary" => "Accept-Encoding"
  "x-xss-protection" => "1; mode=block"

But in CoreConstants::CONTENT_TYPE we have Content-Type.
Then $httpHeaders[CoreConstants::CONTENT_TYPE] will return error: Undefined index: Content-Type

@tariqwiztech
Copy link

I am facing the same issue :(

@msankar1991
Copy link

Same issue I'm also getting now

@virendrachandak
Copy link

This is duplicate of #236 where a solution is provided. Hopefully this will be fixed in the next version.

@diana-derose
Copy link
Collaborator

Hi - Can one of you provide the company id for which you are getting the incorrect headers?

@Nks
Copy link
Author

Nks commented Jul 18, 2019

Hi - Can one of you provide the company id for which you are getting the incorrect headers?

I can't because of NDA but why just not simply make a strtolower for all headers like this done in #236?

Of course this is just a notice which can be hidden by adding error_reporting(error_reporting() & ~E_NOTICE); before configuring the service.

@Nks
Copy link
Author

Nks commented Jul 18, 2019

Also I think this is really bad behavior when the system breaking on the log.

@diana-derose
Copy link
Collaborator

Yes, we'll update the SDK to fix the lower case issue too but we were trying to solve the root cause than adding a patch here. We are unable reproduce it with any of our trial companies which makes us think this is happening for special kind of requests, hence the ask to share additional details.

hlu2 added a commit that referenced this issue Jul 18, 2019
@hlu2
Copy link
Contributor

hlu2 commented Jul 18, 2019

If the issue still persist, re-open this issue.

@hlu2 hlu2 closed this as completed Jul 18, 2019
alexjeen added a commit to vontis-nl/QuickBooks-V3-PHP-SDK that referenced this issue Jul 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants