Skip to content
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

responseSerializer->Deserialize gives Undefined array key var #502

Open
patricksebastien opened this issue Oct 18, 2023 · 1 comment
Open

Comments

@patricksebastien
Copy link

patricksebastien commented Oct 18, 2023

I am having an issue with Query exchangerate objects

PHP 8.2 - quickbooks/v3-php-sdk v6.1.2

When trying to query:
select * from exchangerate where sourcecurrencycode in ('EUR', 'INR') and asofdate='2023-07-07'

The DataService output this (GOOD):
$tmpXML = $responseXmlObj->QueryResponse->asXML();

<QueryResponse startPosition="1" maxResults="2" totalCount="2"><ExchangeRate><MetaData><LastUpdatedTime>2023-07-07T21:02:56-07:00</LastUpdatedTime></MetaData><SourceCurrencyCode>INR</SourceCurrencyCode><TargetCurrencyCode>CAD</TargetCurrencyCode><Rate>0.016149</Rate><AsOfDate>2023-07-07</AsOfDate></ExchangeRate><ExchangeRate><MetaData><LastUpdatedTime>2023-07-07T21:02:56-07:00</LastUpdatedTime></MetaData><SourceCurrencyCode>EUR</SourceCurrencyCode><TargetCurrencyCode>CAD</TargetCurrencyCode><Rate>1.4558</Rate><AsOfDate>2023-07-07</AsOfDate></ExchangeRate></QueryResponse>

BUT the Deserialize code right after is giving me an error Undefined array key var
$parsedResponseBody = $this->responseSerializer->Deserialize($tmpXML, false);

File causing the issue is Bind.php:138:
vendor/quickbooks/v3-php-sdk/src/XSD2PHP/src/com/mikebevz/xsd2php/Bind.php:138

I am drilling down the issue to this piece of code which output false:
$propertyDocs = $refl->getProperty($name)->getDocComment();

And there's goes 2 hours of my life for an undocumented installation information, solution is to set:
opcache.save-comments = 1

Please update the doc:
image

@patricksebastien
Copy link
Author

Actually, reopening so that someone from Intuit see this and does update the doc...

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

1 participant