Skip to content

Commit

Permalink
Fix a couple of undefined offset warnings when running --version with…
Browse files Browse the repository at this point in the history
… a remote site alias.
  • Loading branch information
greg-1-anderson committed Aug 30, 2013
1 parent e81b76c commit 1d0107a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion includes/command.inc
Expand Up @@ -1167,7 +1167,7 @@ function drush_parse_command() {

// Get a list of all implemented commands.
$implemented = drush_get_commands();
if (isset($implemented[$args[0]])) {
if (!empty($args) && isset($implemented[$args[0]])) {
$command = $implemented[$args[0]];
$arguments = array_slice($args, 1);
}
Expand Down
2 changes: 1 addition & 1 deletion includes/sitealias.inc
Expand Up @@ -21,7 +21,7 @@ function drush_sitealias_check_arg() {
$args = drush_get_arguments();

// Test to see if the first arg is a site specification
if (_drush_sitealias_set_context_by_name($args[0])) {
if (!empty($args) && _drush_sitealias_set_context_by_name($args[0])) {
drush_set_context('DRUSH_TARGET_SITE_ALIAS', $args[0]);
array_shift($args);
// We only need to expand the site specification
Expand Down

0 comments on commit 1d0107a

Please sign in to comment.