From 0f4b04e145a3843d5bf4924297732241c32a603d Mon Sep 17 00:00:00 2001 From: Erik Amaru Ortiz Date: Thu, 8 May 2014 09:47:39 -0400 Subject: [PATCH] Little fix when $output has not defined such as a normal terminal env like jenkins job execution. --- workflow/engine/bin/tasks/cliCommon.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflow/engine/bin/tasks/cliCommon.php b/workflow/engine/bin/tasks/cliCommon.php index 7cd0cd3f5..2e5653d2e 100755 --- a/workflow/engine/bin/tasks/cliCommon.php +++ b/workflow/engine/bin/tasks/cliCommon.php @@ -27,7 +27,7 @@ /* Get the size of the terminal (only works on Linux, on Windows it's always 80) */ preg_match_all("/rows.([0-9]+);.columns.([0-9]+);/", strtolower(exec('stty -a |grep columns')), $output); -if(sizeof($output) == 3) { +if(sizeof($output) == 3 && isset($output[2]) && isset($output[2][0])) { define("COLUMNS", $output[2][0]); } else { define("COLUMNS", 80);