[Console] added an exception when the padding char is empty to avoid a PHP error in the table helper

This commit is contained in:
Fabien Potencier 2013-10-02 09:34:00 +02:00
parent 04d767db56
commit e9ea73311f

View File

@ -162,6 +162,10 @@ class TableHelper extends Helper
*/ */
public function setPaddingChar($paddingChar) public function setPaddingChar($paddingChar)
{ {
if (!$paddingChar) {
throw new \LogicException('The padding char must not be empty');
}
$this->paddingChar = $paddingChar; $this->paddingChar = $paddingChar;
return $this; return $this;