- for ($j = 0; $j < count($this->_data[$i]); $j++) {
- if ($this->_data[$i] !== CONSOLE_TABLE_HORIZONTAL_RULE &&
- $this->_strlen($this->_data[$i][$j]) <
- $this->_cell_lengths[$j]) {
- $this->_data[$i][$j] = $this->_strpad($this->_data[$i][$j],
- $this->_cell_lengths[$j],
- ' ',
- $this->_col_align[$j]);
+ if (is_array($this->_data[$i])) {
+ for ($j = 0; $j < count($this->_data[$i]); $j++) {
+ if ($this->_data[$i] !== CONSOLE_TABLE_HORIZONTAL_RULE &&
+ $this->_strlen($this->_data[$i][$j]) <
+ $this->_cell_lengths[$j]) {
+ $this->_data[$i][$j] = $this->_strpad($this->_data[$i][$j],
+ $this->_cell_lengths[$j],
+ ' ',
+ $this->_col_align[$j]);
+ }