Bug #36954

Only use ansi colors for var_dump() if supported

Added by Bastian Waidelich about 1 year ago. Updated about 1 year ago.

Status:Resolved Start date:2012-05-08
Priority:Should have Due date:
Assignee:Bastian Waidelich % Done:

100%

Category:Cli
Target version:TYPO3 Flow Base Distribution - 1.1
PHP Version: Complexity:
Has patch:No FLOW3 version affected:Git master
Votes: 0

Description

\TYPO3\FLOW3\var_dump() currently uses ANSI codes to colorize variables on the CLI.
On Windows that's not supported by default and instead all special characters are outputted.
I don't know how to detect ansi support from PHP, so I would suggest to disable this on Windows for now.
The change is trivial:

1 $ansiColors = $plaintext;

1 $ansiColors = $plaintext && DIRECTORY_SEPARATOR === '/';

Associated revisions

Revision aeaa424b
Added by Bastian Waidelich about 1 year ago

[BUGFIX] Only use ansi colors for var_dump() if supported

\TYPO3\FLOW3\var_dump() currently uses ANSI codes to colorize
the output on the CLI.
On Windows that's not supported by default. It renders all special
characters instead.

This change disables ansiColors on Windows.

Change-Id: Ia6d71c8995528b62ee6b869e2e6044528b886fc1
Fixes: #36954
Releases: 1.1

History

Updated by Gerrit Code Review about 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11080

Updated by Gerrit Code Review about 1 year ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11080

Updated by Bastian Waidelich about 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF