Undefined variable $directory in drush_features_export()

Created on 17 August 2019, over 5 years ago
Updated 26 July 2023, over 1 year ago

drush_features_export() has this line of code:

$directory = isset($directory) ? $directory : $destination . '/' . $module;

This is the first time that the variable is used in the function.
As a result, isset($directory) is always FALSE.
The line can be simplified like so:

$directory = $destination . '/' . $module;

Note: In _drush_features_export() we DO have a $directory parameter. This function has a similar line of code which actually does make sense.
But in drush_features_export() (without underscore) it should be removed.

The code was introduced in #1331278: Drush features-add and features-export are confusingly similar, and overly verbose . The problem already existed at the time, the $directory was already undefined back then.

📌 Task
Status

Fixed

Version

2.0

Component

Code

Created by

🇩🇪Germany donquixote

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