Talk:WikiDB/Bugs

From TestWiki
< Talk:WikiDB
Revision as of 22:22, 8 April 2007 by Jacob (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

I noticed a bug:
If the criteria attribute results in zero rows being returned from PerformQuery, the call to NormaliseData is resulting in 1 row for each column in the table. After a bit of investigation, it turns out that Normaise is creating an empty array, but with the column names as tags inside the array, causing the loop to loop through the tags, rather than the rows (as would be expected). This is pretty easily fixed. I placed the following at the beginning of NormaliseData, and it fixed the issue for me:

if(!is_array($Data) || count($Data) == 0)
{
    return $FormattedData;
}

-Jacob 23:22, 8 April 2007 (BST)