From dfb5b3e639e7870fd76fe6772f422c4f11567d11 Mon Sep 17 00:00:00 2001 From: Andrea Adamczyk Date: Wed, 17 Nov 2021 09:17:42 -0400 Subject: [PATCH] PMCORE-3527-B --- workflow/engine/classes/CLI.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/workflow/engine/classes/CLI.php b/workflow/engine/classes/CLI.php index c98053df0..9963ce5fc 100644 --- a/workflow/engine/classes/CLI.php +++ b/workflow/engine/classes/CLI.php @@ -206,8 +206,10 @@ EOT; $args = $argv; $cliname = array_shift( $args ); $taskName = array_shift( $args ); - while ($taskName[0] == '-') { - $taskName = array_shift( $args ); + if (isset($taskName[0])) { + while ($taskName[0] == '-') { + $taskName = array_shift( $args ); + } } if (! $taskName) { echo self::error( "Specify a task from the list below." ) . "\n\n";