1
Vote

The parseDT() function crashes if the web service being consumed returns 0 results for an operation.

description

Throws E_NOTICEs and E_WARNINGs about an invalid array index.
 
I was able to work around the issue using the following patch:
 
    $parsedXML = ParseXML::parse(strstr($source, '<diffgr:diffgram'));
 
    //go to the proper depth to position over each row in the datatable
    // [BEGIN FIX]
    if(count($parsedXML[0]) == 3)
        $totalEvents = $parsedXML[0][0];
    else
        $totalEvents = array();
    // [END FIX]

    //datatables carry a lot of excess bulk - the skips help us jump over some of that
    $skip=0;

comments

edillingham wrote Dec 28, 2010 at 4:12 PM

Sorry, the code block starts at line 111 in SuperPhpNet.php.

wrote Feb 13, 2013 at 12:28 AM