diff --git a/src/Command.php b/src/Command.php index 8d77d1e..2f34fc1 100644 --- a/src/Command.php +++ b/src/Command.php @@ -147,14 +147,14 @@ public function setCommand($command) $command = escapeshellcmd($command); } if ($this->getIsWindows()) { - $position = null; - // Make sure to switch to correct drive like "E:" first if we have a full path in command if (isset($command[1]) && $command[1]===':') { $position = 1; // Could be a quoted absolute path because of spaces. i.e. "C:\Program Files (x86)\file.exe" } elseif (isset($command[2]) && $command[2]===':') { $position = 2; + } else { + $position = false; } // Absolute path. If it's a relative path, let it slide.