"Undefined index: description" with drush

Created on 2 May 2018, over 6 years ago
Updated 24 February 2023, almost 2 years ago

When running "drush help imageapi-optimize -v" a notice is thrown in drush:

Undefined index: description command.inc:1296

This is caused by the way the imageapi-optimize drush command defines it's argument:

function imageapi_optimize_drush_command() {
  $commands['imageapi-optimize'] = array(
    'arguments' => array(
      // This is the problem.
      'path' => array(
        dt('The path of a single image or directory of images to optimize.'),
      ),
    ),
  );
}

Either the 'path' argument needs to be a simple 'key' => 'description' value, or the array needs to be indexed with a 'description' key. For example:

function imageapi_optimize_drush_command() {
  $commands['imageapi-optimize'] = array(
    'arguments' => array(
      'path' => dt('The path of a single image or directory of images to optimize.'),
    ),
  );
}
πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States joelstein

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024