HomePhabricator

Fix the width of `PhutilConsoleTable` if the header row is wider than the data…

Description

Fix the width of PhutilConsoleTable if the header row is wider than the data rows.

Summary:
Currently, the width of the header text is not taken into consideration when drawing the table. The width of the header text must be accounted for as if it were an ordinary row. Specifically, the following error occurs otherwise:

PHP Warning:  str_repeat(): Second argument has to be greater than or equal to 0 in /home/joshua/workspace/github.com/phacility/libphutil/src/console/PhutilConsoleTable.php on line 211

Test Plan: Drew a table with a really wide header column. verified that no warnings were raised and that the table rendered correctly.

Reviewers: epriestley, Blessed Reviewers

Reviewed By: epriestley, Blessed Reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9583

Details

Provenance
joshuaspenceAuthored on
joshuaspencePushed on Jun 16 2014, 10:29 PM
Reviewer
Blessed Reviewers
Differential Revision
D9583: Fix the width of `PhutilConsoleTable` if the header row is wider than the data rows.
Parents
rPHU41d51cc2b01d: Rebuild `xhpast.exe` with static linkage
Branches
Unknown
Tags
Unknown

Event Timeline