Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Console_Color2 to prevent E_NOTICES #6

Merged
merged 1 commit into from Feb 5, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions Table.php
Expand Up @@ -151,7 +151,7 @@ class Console_Table
/** /**
* Whether the data has ANSI colors. * Whether the data has ANSI colors.
* *
* @var boolean * @var Console_Color2
*/ */
var $_ansiColor = false; var $_ansiColor = false;


Expand All @@ -176,9 +176,9 @@ function Console_Table($align = CONSOLE_TABLE_ALIGN_LEFT,
$this->_defaultAlign = $align; $this->_defaultAlign = $align;
$this->_border = $border; $this->_border = $border;
$this->_padding = $padding; $this->_padding = $padding;
$this->_ansiColor = $color; if ($color) {
if ($this->_ansiColor) { include_once 'Console/Color2.php';
include_once 'Console/Color.php'; $this->_ansiColor = new Console_Color2();
} }
if (!empty($charset)) { if (!empty($charset)) {
$this->setCharset($charset); $this->setCharset($charset);
Expand Down Expand Up @@ -781,7 +781,7 @@ function _strlen($str)


// Strip ANSI color codes if requested. // Strip ANSI color codes if requested.
if ($this->_ansiColor) { if ($this->_ansiColor) {
$str = Console_Color::strip($str); $str = $this->_ansiColor->strip($str);
} }


// Cache expensive function_exists() calls. // Cache expensive function_exists() calls.
Expand Down
4 changes: 2 additions & 2 deletions package.xml
Expand Up @@ -65,9 +65,9 @@ Use line breaks dependent on the current operating system.
</required> </required>
<optional> <optional>
<package> <package>
<name>Console_Color</name> <name>Console_Color2</name>
<channel>pear.php.net</channel> <channel>pear.php.net</channel>
<min>0.0.4</min> <min>0.1.2</min>
</package> </package>
</optional> </optional>
</dependencies> </dependencies>
Expand Down