Open emilebourquin opened 2 years ago
I guess I shouldn't say QuickBooks Online was offline, but rather QuickBooks Online was returning XML such that
$Doc = $Parser->parse($errnum, $errmsg)
and
$Root = $Doc->getRoot();
were succeeding, but
$List = $Root->getChildAt('IntuitResponse QueryResponse')
was false, and
$attrs = $List->attributes();
caused a fatal error.
This diff looks much bloodier than it is. All I did was wrap the call to $List = $Root->getChildAt('IntuitResponse QueryResponse') in an IF, and return false in the ELSE.
Prevents a fatal error when QuickBooks Online returns incomplete XML, and the call to $List = $Root->getChildAt('IntuitResponse QueryResponse') returns FALSE, so $List->attributes() throws an error.