Homec4science

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

Authored by Joshua Spence <josh@joshuaspence.com> on Jun 17 2014, 00:29.

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

Committed
Joshua Spence <josh@joshuaspence.com>Jun 17 2014, 00:29
Pushed
aubortMar 17 2017, 12:03
Parents
rPHU41d51cc2b01d: Rebuild `xhpast.exe` with static linkage
Branches
Unknown
Tags
Unknown

Event Timeline

Joshua Spence <josh@joshuaspence.com> committed rPHUfdbc18012baa: Fix the width of `PhutilConsoleTable` if the header row is wider than the data… (authored by Joshua Spence <josh@joshuaspence.com>).Jun 17 2014, 00:29