summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-10-25 10:12:58 +0200
committerRemi Collet <fedora@famillecollet.com>2014-10-25 10:12:58 +0200
commitf696e82fa9c585d19eb411e83933aac7b637368b (patch)
treef4c84b1261fb66ccddc44e1f5c07bb7dc849bd4d
parentb35084ddc9955e541edc5d9c9ec80027e21035cb (diff)
php-phpunit-environment: more upstream fix
-rw-r--r--environment-upstream.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/environment-upstream.patch b/environment-upstream.patch
index 450b630..c52005f 100644
--- a/environment-upstream.patch
+++ b/environment-upstream.patch
@@ -80,3 +80,36 @@ index 84fc94a..ac1b1a3 100644
+ return function_exists('posix_isatty') && @posix_isatty($fd);
}
}
+From 6e6c71d918088c251b181ba8b3088af4ac336dd7 Mon Sep 17 00:00:00 2001
+From: Sebastian Bergmann <sb@sebastian-bergmann.de>
+Date: Sat, 25 Oct 2014 10:00:45 +0200
+Subject: [PATCH] Make sure we have STDIN and STDOUT before using them
+
+---
+ src/Console.php | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/Console.php b/src/Console.php
+index ac1b1a3..13a9672 100644
+--- a/src/Console.php
++++ b/src/Console.php
+@@ -66,6 +66,10 @@ public function hasColorSupport()
+ return false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI');
+ }
+
++ if (!defined('STDOUT')) {
++ return false;
++ }
++
+ return $this->isTty(STDOUT);
+ }
+
+@@ -82,7 +86,7 @@ public function getNumberOfColumns()
+ return 79;
+ }
+
+- if (!$this->isTty(STDIN)) {
++ if (!defined('STDIN') || !$this->isTty(STDIN)) {
+ return 80;
+ }
+