Skip to content

Conversation

@GautamParmar22
Copy link

I faced an issue where LogAPIResponseToLog() threw "Content-Type on null" and
null comparison errors because it assumed the Content-Type header was
always present.

This fix adds an isset() check before accessing the Content-Type key,
so XML parsing is only attempted when the header exists.

With this change, API response logging no longer breaks when the
Content-Type header is missing or has unexpected values, making it
safer and more reliable.

@GautamParmar22
Copy link
Author

GautamParmar22 commented Oct 14, 2025

This PR fixes the "Content-Type on null" error in LogAPIResponseToLog() by adding an isset() check before accessing the Content-Type header.

Tested on v6.2.0 — verified that API response logging now works correctly even when the Content-Type header is missing or has unexpected values.

Issue: #555

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

Successfully merging this pull request may close these issues.

1 participant