Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.8.4

Bug #7971 setTab() does not work
Submitted: 2006-06-23 11:38 UTC
From: kristoffer dot paro at gmail dot com Assigned: wiesemann
Status: Closed Package: HTML_Table (version 1.7.0)
PHP Version: 5.1.4 OS: Debian GNU/Linux
Roadmaps: (Not assigned)    

 [2006-06-23 11:38 UTC] kristoffer dot paro at gmail dot com (Kristoffer Paro)
Description: ------------ The function setTab() does not work properly for html outputted by HTML_Table. This is because a setTab request does not descend into the _tbody, _thead and _tfoot objects. Therefore anything outputted by an object of the HTML_Table_Storage class will use the default tab (the \t character). Suggested solution: HTML_Table should override the setTab() function and call setTab on _tbody, _thead and _tfoot. Test script: --------------- $t = new HTML_Table(); //Set tab to a double space $t->setTab(" "); $t->addRow(array('a', 'b', 'c')); echo $t->toHtml(); Expected result: ---------------- Double spaced table: <table> <tr> <td>a</td> <td>b</td> <td>c</td> </tr> </table> Actual result: -------------- Table is spaced by \t characters <table> <tr> <td>a</td> <td>b</td> <td>c</td> </tr> </table>


 [2006-06-23 16:42 UTC] wiesemann (Mark Wiesemann)
Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at --- Thanks for noting this, Kristoffer. I did not fix it like you suggested but the idea is almost the same.